/* ====================
    基本設定
    (グローバル設定 = スマートフォンのデフォルトスタイル)
    ==================== */
: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;
}

html {
    font-size: 62.5%;
}

body {
    /* 💡 変更なし: グローバルな line-height は 1.8 を維持 */
    font-size: 1.6rem; 
    font-family: "Noto Serif JP",serif, '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: 30px 20px; 
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-color);
}

section {
    padding: 20px 15px;
}

/* ====================
    ヘッダー (モバイルデフォルト: 左右配置)
    ==================== */
.header-container {
    display: flex;
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center; 
    text-align: left; 
    padding-bottom: 20px; 
}

.site-info {
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    text-align: left; 
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    /* 💡 修正: h1のマージンをリセット (line-heightで調整するため) */
    margin-bottom: 0; 
}

.header h1 a {
    text-decoration: none;
    color: var(--primary-color);
    /* 💡 修正: line-height を詰める */
    line-height: 1.1; 
}

.header h1 a .jp-name {
    font-size: 2.0rem;
    color: var(--secondary-text-color);
    font-weight: 400;
    display: inline;
    /* 💡 修正: line-height を詰める */
    line-height: 1.1; 
}

.header-tagline {
    font-size: 1.5rem;
    color: var(--secondary-text-color);
    margin: 0;
    /* 💡 修正: h1との間隔を詰めるため、上マージンを0に */
    margin-top: 0; 
    /* 💡 修正: line-height を詰める */
    line-height: 1.2; 
}

/* ナビゲーションのリスト全体 (モバイルデフォルト: 縦並び) */
.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 0;
}

/* ナビゲーションのリンク全体 */
.nav-menu a {
    text-decoration: none;
    position: relative;
    font-weight: 700;
    transition: color 0.3s ease;
    color: var(--text-color);
    padding: 0;
    font-size: 1.5rem;
    
    padding: 10px 10px; 
    display: block; 
}

.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 {
    background-image: url('../images/GGI_saneyoshi_image_header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100px;
    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: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
    padding: 0 10px;
}

/* 大見出し、サブタイトル、本文のスタイル (中略) */
.main-content h2 {
    font-size: 1.9rem;
    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.5rem;
    color: var(--text-color);
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: center;
}

.main-content h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 15px;
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    text-align: left;
    display: inline-block;
}

.main-content p, .main-content ul {
    font-size: 1.5rem;
    margin-top: 0px; /* 15px; test*/ 
    margin-bottom: 10px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6; 
    text-align: left;
    padding: 0;
}

.main-content ul {
    list-style: disc;
    padding-left: 20px;
}

.main-content ul li {
    margin-bottom: 0.8rem;
}

.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: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    font-size: 1.5rem;
    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: 40px;
    font-size: 1.5rem;
    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: 3.0rem;
    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; 
}

/* ====================
    ハンバーガーメニューのモバイルデフォルト設定 
    (タブレットまでこれを維持)
    ==================== */
.hamburger-btn {
    display: block; 
    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: 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 .nav-menu ul {
    width: 100%; 
}
.nav-list.open {
    display: flex;
    transform: translateX(0);
}
.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);
}


/* ==========================================================
    レスポンシブ対応
    (min-widthでスタイルを追加/上書きしていく)
    ========================================================== */

/* --------------------
    タブレット対応 (min-width: 769px)
    -------------------- */
@media (min-width: 769px) {
    
    .container {
        padding: 50px 60px;
    }

    /* ヘッダー: ロゴとハンバーガーは左右に配置を維持 */
    .header h1 a .jp-name {
        display: block; 
    }
    
    /* コンテンツ: Heroの高さを戻す */
    .hero {
        height: 400px;
    }
    .hero-headline {
        font-size: 3.0rem;
    }
    
    /* 本文の font-size を大きくする（タブレット/PCの基準） */
    .main-content p, .main-content ul {
        font-size: 1.6rem; 
    }
}

/* --------------------
    PC向け設定 (min-width: 1025px) - PCで横並びに切り替え
    -------------------- */
@media (min-width: 1025px) {
    
    .container {
        padding: 50px 80px;
    }

    /* PCサイズでハンバーガーを非表示にし、横並びメニューを表示 */
    .hamburger-btn {
        display: none; 
    }
    .nav-list {
        display: flex; 
        flex-direction: row;
        flex-wrap: nowrap; 
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        transform: translateX(0);
        z-index: auto;
    }
    .nav-menu ul {
        flex-direction: row;
        gap: 20px;
        align-items: center;
    }
    .nav-menu a {
        white-space: nowrap; 
        font-size: 1.5rem;
        padding: 0 10px; 
        display: block;
    }
    
    /* 各見出しのフォントサイズを調整 (PC向け) */
    .header h1 {
        font-size: 3.1rem;
        /* 💡 変更なし: PCでは line-height: 1.1; が有効 */
        margin-bottom: 0; 
    }
    .header h1 a .jp-name {
        font-size: 2.0rem;
    }
    .header-tagline {
        /* 💡 変更なし: PCでは line-height: 1.2; が有効 */
        margin-top: 0; 
    }
    .main-content h2 {
        font-size: 2.2rem;
    }
    .main-content h3 {
        font-size: 2.0rem;
    }
    .main-content h4 {
        font-size: 1.5rem;
    }

    /* 本文のフォントサイズをPC向けに調整 */
    .main-content p, .main-content ul {
        font-size: 1.5rem;
    }
    
    .footer {
        font-size: 1.5rem;
    }
}


/* 下線アニメーションの定義 */
@keyframes underline-grow {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}