/* 基本リセットと全体設定 */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa; /* 全体の背景色 */
  overflow-x: hidden; /* 横スクロールバーを非表示 */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 画面高さがコンテンツより短くてもフッターを最下部に */
}

/* リンクの基本スタイル */
a {
    transition: color 0.2s ease;
    color: black;
    font-weight: 500;
    display: inline-block;
}

/* ★★★ ヘッダー (ナビゲーションバー) ★★★ */
.main-header {
  position: fixed; /* 画面上部に固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 60px; /* PC版ヘッダーの高さ */
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000; /* 最前面に */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px; /* 最大幅 */
  margin: 0 auto; /* 中央寄せ */
  height: 100%; /* 親の高さに合わせて要素を配置 */
  padding: 0 20px; /* 左右のパディング */
}

.site-logo {
  font-size: 1.8em; /* モバイルでのロゴサイズ */
  font-weight: bold;
  margin: 0;
}
.site-logo a {
  color: #007bff;
  text-decoration: none;
}

/* ナビゲーションリンク */
.main-nav .main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none; /* モバイルではデフォルト非表示 */
  flex-direction: column; /* 縦並び */
  background-color: #ffffff;
  position: absolute; /* ヘッダーに対して絶対位置 */
  top: 60px; /* ヘッダーの高さ分下に */
  right: 0;
  width: 100%; /* 全幅に */
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  padding: 10px 0;
  z-index: 999; /* ヘッダーより少し下 */
}
.main-nav .main-menu.active {
    display: flex; /* JSでactiveクラスが追加されたら表示 */
}
.main-nav .main-menu li {
  margin: 0;
  width: 100%;
  text-align: center; /* 中央寄せ */
}
.main-nav .main-menu li a {
  color: #555;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 0;
  display: block; /* クリック領域を広く */
  border-bottom: 1px solid #eee; /* 区切り線 */
}
.main-nav .main-menu li:last-child a {
  border-bottom: none; /* 最後の項目は線なし */
}

/* ハンバーガーメニューアイコン (モバイルでのみ表示) */
.menu-toggle {
  display: block; /* モバイルで表示 */
  background: none;
  border: none;
  color: #555;
  font-size: 28px;
  cursor: pointer;
  z-index: 1001; /* ナビゲーションより手前に */
}


/* ★★★ メインビジュアル (Hero Section) ★★★ */
.hero-section {
  background: linear-gradient(rgba(0, 123, 255, 0.8), rgba(0, 86, 179, 0.8)), url('header_bg.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 80px 20px; /* 上下のパディング */
  padding-top: calc(80px + 60px); /* ★修正：ヘッダーの高さ分を考慮 */
  min-height: 200px; /* 最小高 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
    max-width: 800px;
    padding: 0 10px; /* 左右のパディング */
}

.hero-tagline {
    font-size: 1.1em;
    margin-bottom: 5px;
}
.hero-title {
    font-size: 3em; /* モバイルでのタイトルサイズ */
    margin: 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.hero-subtitle {
    font-size: 1.4em;
    margin-top: 5px;
    font-weight: normal;
}
.hero-description { /* 新規追加 */
    font-size: 1.1em;
    margin-top: 20px;
    line-height: 1.8;
}
.hero-intro span { /* テキストが途切れないように */
    display: inline-block;
    white-space: normal;
}

.hero-buttons {
    margin-top: 30px;
}
.button-primary, .button-secondary {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px; /* ボタン間のマージン */
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.1s ease;
}
.button-primary {
    background-color: #28a745;
    color: white;
    border: 2px solid #28a745;
}
.button-primary:hover {
    background-color: #218838;
    transform: translateY(-2px);
}
.button-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}
.button-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ★★★ メインコンテンツのラッパー (wrap) ★★★ */
.main-content-wrap { /* .wrapからリネーム */
    flex-grow: 1;
    width: 100%;
    max-width: 1200px; /* PC版の最大幅 */
    margin: 0 auto; /* 左右中央寄せ */
    background-color: #FAFAFA;
}

/* 各セクションの共通スタイル */
.content-section {
    padding: 40px 20px; /* 上下左右パディング */
    border-bottom: 1px solid #e9ecef;
}
.content-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 2em; /* モバイルでのタイトルサイズ */
    font-weight: bold;
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #007bff;
    margin: 10px auto 0;
}

.section-body {
    font-size: 1em; /* モバイルでの本文フォントサイズ */
    color: #444;
    line-height: 1.8;
}
.section-body p {
    margin-bottom: 1em;
}

/* 開発理念セクションのリスト */
.philosophy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.philosophy-list li {
    margin-bottom: 25px; /* 各項目間の間隔 */
}
.philosophy-list li h3 {
    font-size: 1.3em; /* 項目タイトルのフォントサイズ */
    color: #007bff;
    margin-bottom: 5px;
}
.philosophy-list li p {
    font-size: 0.95em;
    margin-left: 20px; /* 本文のインデント */
    color: #555;
}

/* お知らせリスト */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-list li {
    padding: 12px 0; /* 上下パディング */
    border-bottom: 1px dashed #ccc;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column; /* モバイルでは縦に並ぶ */
    align-items: flex-start;
}
.news-list li:last-child {
    border-bottom: none;
}
.news-list li:hover {
    background-color: #f0f0f0;
}
.news-list li .news-date {
    font-weight: bold;
    color: #555;
    margin-right: 0; /* モバイルでは右マージン不要 */
    margin-bottom: 5px; /* 日付とタイトルの間にスペース */
    white-space: nowrap;
    min-width: auto;
}
.news-list li .news-title {
    flex-grow: 1;
    color: black;
    font-size: 1.05em;
}
.btn { /* 「さらに表示」ボタン */
    display: block;
    width: fit-content;
    margin: 15px auto 0;
    padding: 8px 15px;
    font-size: 1em;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    color: black;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn:hover {
    background-color: #e0e0e0;
}

/* WIM-SECでできること (コンテンツ概要リスト) */
.contents-summary-list {
  list-style: none; /* デフォルトのリストスタイルを削除 */
  padding: 0;
  margin: 0;
}
.contents-summary-list li {
    margin-bottom: 15px; /* 各項目間のマージン */
    margin-left: 0; /* デフォルトのliマージンをリセット */
    list-style-type: none; /* 親のsession_title liのスタイルを引き継がない */
}
.contents-summary-list li a { /* タイトルリンク */
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}
.contents-summary-list .indent { /* 説明文 */
    margin-left: 20px;
    font-size: 0.95em;
    color: #555;
}
.contents-summary-list .indent div {
    margin-bottom: 5px;
}
.last-updated-contents-text {
    font-size: 0.9em;
    color: #888;
    text-align: right;
    margin-top: -10px; /* 少し上に詰める */
    margin-bottom: 20px;
}

/* お問い合わせ先、開発者情報 */
.contact-info-list, .developer-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-info-list li, .developer-info-list li {
    margin-bottom: 8px;
}

/* フッター */
footer {
    width: 100%;
    padding: 20px;
    background-color: #333; /* 濃い背景 */
    color: white;
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0; /* フッターが縮まないようにする */
}
footer p {
    margin: 0;
    font-size: 0.9em;
}
footer a {
    color: #007bff;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* ★★★ モーダルダイアログのスタイル ★★★ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.active {
    opacity: 1;
}
.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 80%;
    overflow: auto;
}
.modal.active .modal-content {
    transform: translateY(0);
}
.modal-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}
.modal-close-button:hover,
.modal-close-button:focus {
    color: #333;
    text-decoration: none;
}
#modal-news-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #007bff;
}
#modal-news-date {
    font-size: 0.9em;
    color: #666;
    text-align: right;
    margin-bottom: 15px;
}
#modal-news-text {
    line-height: 1.8;
    margin-bottom: 20px;
}
#modal-news-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#modal-news-links li {
    margin-bottom: 5px;
}
#modal-news-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}
#modal-news-links a:hover {
    text-decoration: underline;
}

/* --- PC版レイアウト (769px以上) --- */
@media (min-width: 769px) {
    .main-nav .main-menu {
        display: flex; /* PC版では横並び表示 */
        flex-direction: row;
        position: static; /* absoluteをリセット */
        background: none;
        box-shadow: none;
        padding: 0;
        width: auto;
    }
    .main-nav .main-menu li {
        margin-left: 30px; /* リンク間のマージン */
        width: auto;
        text-align: left;
        border-bottom: none;
    }
    .main-nav .main-menu li a {
        padding: 5px 0;
    }
    .menu-toggle {
        display: none; /* PC版では非表示 */
    }

    .hero-title {
        font-size: 4em;
    }
    .hero-subtitle {
        font-size: 1.8em;
    }
    .Header_title div:last-child {
        font-size: 40px !important; /* PC版のサイズに戻す */
    }

    .section-title {
        font-size: 2.5em; /* PC版のタイトルサイズ */
    }
    .section-body {
        font-size: 1.05em; /* PC版の本文フォントサイズ */
    }

    /* 開発理念セクションのリスト調整 */
    .philosophy-list li {
        font-size: 1.1em;
        margin-bottom: 25px;
    }
    .philosophy-list li h3 {
        font-size: 1.5em;
    }

    /* .indent をPC版の通常のインデントに戻す */
    .indent {
        margin-left: 40px;
    }
}

.news-category {
    font-size: 0.8em;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 10px;
    color: white;
}
.category-重要 { background-color: #dc3545; }
.category-お知らせ { background-color: #007bff; }
.category-メンテナンス { background-color: #ffc107; color: #333; }
.category-コンテンツ追加 { background-color: #28a745; }

/* ★★★ モーダル内のカテゴリ表示用スタイル ★★★ */
#modal-news-category {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 0.9em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
    color: white;
}
/* モーダルタイトルがカテゴリと重ならないように調整 */
#modal-news-title {
    margin-top: 25px; /* カテゴリタグの高さ分マージンを追加 */
}