/* ====================
   基本設定
   ==================== */
   :root {
    --primary-color: #0056b3; /* ブランドの青 */
    --text-color: #333;
    --background-color: #f8f8f8;
    --container-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --secondary-text-color: #666; /* サブテキストの色 */
}

body {
    font-family: 'Noto Sans JP', 'Open Sans', sans-serif;
    line-height: 1.8;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px 20px;
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    width: 100%;
    background-color: var(--container-bg);
    padding: 50px 60px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-color);
}

/* ====================
   ヘッダー
   ==================== */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
}

.site-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
}

.header h1 a {
    text-decoration: none;
    color: var(--primary-color);
    line-height: 1.2;
}

.header h1 a .jp-name {
    font-size: 0.65em;
    color: var(--secondary-text-color);
    font-weight: 400;
    display: block;
}

.header-tagline {
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin: 0;
}

/* ナビゲーションのリスト全体 */
.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px; /* リンク間の間隔 */
}

/* ナビゲーションのリンク全体 */
.nav-menu a {
    text-decoration: none;
    position: relative;
    font-weight: 700;
    transition: color 0.3s ease;
    color: var(--text-color);
    padding: 0;
}

/* 訪問済みリンクの色を統一 */
.nav-menu a:visited {
    color: var(--text-color);
}

/* ホバー時のスタイル */
.nav-menu a:hover {
    color: var(--primary-color);
}

/* ホバー時の下線エフェクト */
.nav-menu a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0; /* アニメーションの開始地点 */
    height: 2px;
    background-color: var(--primary-color);
    animation: underline-grow 0.3s ease-in-out forwards;
}

/* カレント（現在地）のスタイル */
.nav-menu a.current {
    color: var(--primary-color);
    font-weight: 900;
}

/* カレント時の固定下線 */
.nav-menu a.current::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

/* ====================
   コンテンツ
   ==================== */

/* heroセクションの基本的なスタイル */
.hero {
    /* 画像のパスは、あなたが画像を保存した場所に合わせる */
    background-image: url('../images/GGI_saneyoshi_image_header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 400px; /* 画像の高さ。好みで調整可能 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    color: #fff; /* テキストの色を白に */
}

/* 画像を暗くするオーバーレイ */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* 暗さを調整可能 */
}

/* 画像の上に表示するキャッチコピーのスタイル */
.hero-headline {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* 文字に影をつけて見やすく */
    z-index: 2; /* テキストが前面に来るように */
}

/* 画面幅が小さい時（スマホなど）の調整 */
@media (max-width: 768px) {
    .hero {
        height: 300px; /* スマホでは高さを少し低くする */
    }
    .hero-headline {
        font-size: 2rem; /* スマホでは文字を小さくする */
    }
}

/* 大見出し (例: 事業概要, 代表者紹介) */
.main-content h2 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 50px;
    margin-bottom: 30px;
    position: relative;
    display: block;
    text-align: center;
}

.main-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 各セクションのサブタイトル (例: 吉村 真樹) */
.main-content h3 {
    font-size: 1.4em;
    color: var(--text-color);
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

/* 各項目タイトル (例: 【略歴】) */
.main-content h4 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    text-align: left;
    display: inline-block;
}

.main-content p, .main-content ul {
    font-size: 1.1em;
    margin-bottom: 1.5em;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.main-content ul {
    list-style: disc;
    padding-left: 20px;
}

.main-content ul li {
    margin-bottom: 0.5em;
}

/* 各種サービス概要のリンクスタイル */
.service-link {
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
    color: var(--primary-color);
}

/* 訪問済みリンクの色を統一 */
.service-link:visited {
    color: var(--primary-color);
}

/* ホバー時の下線アニメーション */
.service-link:hover {
    color: var(--primary-color);
}

.service-link:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    animation: underline-grow 0.3s ease-in-out forwards;
}

/* 連絡先情報 */
.contact-info {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    font-size: 1em;
    text-align: center;
}

.contact-info .area-text {
    text-align: left;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #003d80;
    text-decoration: underline;
}

/* フッター */
.footer {
    margin-top: 60px;
    font-size: 0.9em;
    color: #888;
    border-top: 1px dashed #eee;
    padding-top: 20px;
    text-align: center;
}

/* ====================
   ポップアップ
   ==================== */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 999;
}

#popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    display: none;
    z-index: 1000;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#close-btn {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #333;
}

/* ====================
   フローティングボタン
   ==================== */
#floating-contact-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;    
}

/* ====================
   レスポンシブ対応
   ==================== */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }

    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .site-info {
        align-items: center;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2em;
    }

    .header h1 a .jp-name {
        display: inline;
    }

    .header-tagline {
        margin-top: 10px;
        text-align: center;
    }

    .nav-menu {
        margin-top: 20px;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
    }

    .main-content h2 {
        font-size: 1.5em;
    }

    .main-content h3 {
        font-size: 1.2em;
    }

    .main-content h4 {
        font-size: 1.1em;
    }

    .main-content p, .main-content ul {
        font-size: 1em;
        padding: 0;
    }

    .contact-info {
        margin-top: 40px;
    }

    .footer {
        margin-top: 40px;
    }
}

/* PC向けにフォントサイズを調整 */
@media (min-width: 1025px) {
    .container {
        padding: 50px 80px;
    }

    /* 基本フォントサイズを少し小さく */
    body {
        font-size: 1.05em; /* 1.1emから微調整 */
    }

    /* 各見出しのフォントサイズを調整 */
    .header h1 {
        font-size: 2.2em;
    }

    .header h1 a .jp-name {
        font-size: 0.6em;
    }
    
    .header-tagline {
        font-size: 0.8em;
    }

    .nav-menu a {
        font-size: 1.05em;
    }

    .main-content h2 {
        font-size: 1.7em;
    }

    .main-content h3 {
        font-size: 1.3em;
    }

    .main-content h4 {
        font-size: 1.1em;
    }

    .main-content p, .main-content ul {
        font-size: 1em;
    }
    
    .footer {
        font-size: 0.85em;
    }
}

/* モバイル向け調整 */
@media screen and (max-width: 768px) {
    /* ナビゲーションメニュー */
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* ヒーローセクション */
    .hero {
        height: 100px;
    }
    .hero-headline {
        font-size: 23px;
        padding: 0 10px; /* テキストが画面からはみ出さないように左右に余白を設定 */
    }

    /* メインコンテンツ内のセクション */
    section {
        padding: 20px 15px; /* 左右の余白を調整 */
    }

    /* 各種サービス概要のリスト */
    .main-content ul {
        padding-left: 20px
    }
    .main-content ul li {
        margin-bottom: 5px;
    }
}

/* 下線アニメーションの定義 */
@keyframes underline-grow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* ハンバーガーアイコンの基本スタイル */
.hamburger-btn {
    display: none; /* デフォルトでは非表示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.hamburger-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

/* ナビゲーションリストの初期状態（非表示） */
.nav-list {
    display: flex; /* PC版では横並び */
    flex-direction: row;
}

/* ====================
   モバイルでのハンバーガーメニュー
   ==================== */
@media screen and (max-width: 768px) {
    .nav-list {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 60%;
        height: 100%;
        background-color: white;
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%);
        z-index: 1002; /* ポップアップメニューよりも高い値を設定 */
    }

    /* メニューが開いたときの状態 */
    .nav-list.open {
        display: flex;
        transform: translateX(0);
    }
    
    /* ハンバーガーアイコンの表示 */
    .hamburger-btn {
        display: block;
    }
    
    /* ハンバーガーアイコンのアニメーション */
    .hamburger-btn.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-btn.is-active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}