/* ==========================================
   hilab-website 共通スタイルシート（完成版）
   ========================================== */

/* 全体設定 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    background-color: #f8fafc;
    color: #334155;
    margin: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ヘッダーエリア */
header {
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #f1f5f9;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    /* 知的なインディゴブルー */
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ★ ロゴ画像のスタイル設定 */
.logo-image {
    height: 32px;
    /* ロゴの高さ（ナビに綺麗に収まるサイズ） */
    width: auto;
    /* 横幅は比率を維持 */
    object-fit: contain;
}

/* ナビゲーション */
nav {
    display: flex;
    gap: 28px;
}

nav a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.2s;
}

nav a:hover {
    color: #2563eb;
}

nav a.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
    /* 修正済み */
    font-weight: 600;
}

/* 言語切り替えボタン */
.lang-switch {
    display: flex;
    gap: 2px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px;
}

.lang-switch button {
    border: none;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    color: #64748b;
    transition: all 0.2s;
}

.lang-switch button:hover {
    background-color: #e2e8f0;
}

.lang-switch button.active {
    background-color: #1e3a8a;
    color: #ffffff;
}

/* メインレイアウト */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
    padding: 48px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    margin: 0 0 16px 0;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.3;
}

.hero p {
    margin: 0;
    font-size: 1.1rem;
    color: #e2e8f0;
    max-width: 650px;
}

/* カードデザイン */
.card {
    background-color: #ffffff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    margin-bottom: 28px;
}

h1 {
    font-size: 2rem;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 24px;
}

h2 {
    font-size: 1.5rem;
    color: #0f172a;
    margin-top: 0;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* メンバー grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.member-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
}

.member-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.avatar {
    width: 88px;
    /* 修正済み */
    height: 88px;
    background: #f1f5f9;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.8rem;
    overflow: hidden;
}

/* --- メンバー一覧・個別ページの写真サイズ制御（修正版） --- */

/* 1. すべてのメンバー写真の「外枠」を強制的に制御する基本クラス */
.avatar {
    background-color: #f1f5f9;
    border-radius: 50%;
    /* 写真をきれいな正円にする */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.8rem;
    overflow: hidden;
    /* ★最重要：はみ出た巨大な原寸大画像をここで完全にカット */
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
}

/* 2. 一覧ページ（members.html）用の小さなサイズ指定 */
.avatar-small {
    width: 90px !important;
    /* 一覧用は 90px */
    height: 90px !important;
    margin: 0 auto 16px;
    /* 中央寄せと下の余白 */
}

/* 3. 個別ページ（sato.html等）用の大きなサイズ指定 */
.avatar-large {
    width: 140px !important;
    /* 個別ページ用は 140px */
    height: 140px !important;
    flex-shrink: 0;
    /* 横並びのときに画像が潰れるのを防ぐ */
}

/* 4. 枠の中に入っている「画像自体のサイズ」を枠に 100% 追従させる */
.avatar img {
    width: 100% !important;
    /* 巨大な原寸大を完全に無視し、枠幅に合わせる */
    height: 100% !important;
    /* 巨大な原寸大を完全に無視し、枠高さに合わせる */
    object-fit: cover;
    /* 縦横比を崩さずに中央で綺麗にトリミング */
    display: block;
}

/* フッター */
footer {
    text-align: center;
    padding: 28px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* メンバー一覧用のシンプルなスタイル */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.member-group {
    margin-bottom: 30px;
}

.member-group h2 {
    border-bottom: 20px;
    border-bottom: 2px solid #333;
    /* 見出しの下に境界線を入れて区切りを明確に */
    padding-bottom: 5px;
}

.member-list {
    list-style-type: none;
    /* デフォルトの黒丸を消す */
    padding-left: 0;
}

.member-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    /* 行間にうっすらと線を引いて視認性を向上 */
    font-size: 1.1rem;
}

/* メンバー名リンクの見た目を整える */
.member-list li a {
    color: #333;
    /* 文字色を他のテキストと合わせる */
    text-decoration: none;
    /* 最初は下線を消しておく */
    font-weight: bold;
    /* リンクであることを分かりやすくするために太字に */
}

/* マウスを載せた（ホバーした）ときだけ下線を出す */
.member-list li a:hover {
    text-decoration: underline;
    color: #0066cc;
    /* ホバー時に少し色を変えるとクリックしやすくなります */
}