/* ==========================================================================
   common.css
    サイト全体で共通して使用するスタイル
    1. グローバル設定
    2. 基本スタイル
    3. 共通レイアウト
        3.1. コンテナとセクション
        3.2. タイトルのテキスト
        3.3. 背景色ユーティリティ
        3.4. ボタンコンポーネント
    4. ヘッダー
        4.1. ロゴ
        4.2. ナビゲーションエリア
        4.3. PCナビゲーション
        4.4. ヘッダーCTA
        4.5. モバイルメニュー
    5. フッター
        5.1. ベースレイアウト
        5.2. 会社情報
        5.3. ナビゲーションエリア
        5.4. コピーライト
    6. アニメーション
    7. コンタクトCTAセクション
   ========================================================================== */
   
/* === 1. グローバル設定 === */
:root {
    /* 色の定義 */
    --color-main: #004488;          /* メインカラー (ディープブルー) */
    --color-accent: #FFC107;        /* アクセントカラー (アンバー/ゴールドイエロー) */
    --color-accent-dark: #e0b100;   /* アクセントカラー (ホバー) */
    --color-bg-light: #F8F8F8;      /* 背景色 (ライトグレー) */
    
    --color-text-dark: #333333;     /* テキスト (ダークグレー) */
    --color-text-light: #FFFFFF;    /* テキスト (ホワイト) */
    --color-text-secondary: #555;   /* テキスト (サブ) */

    /* フォント */
    --font-family-base: 'Noto Sans JP', sans-serif;
    --font-family-heading: 'Roboto', 'Noto Sans JP', sans-serif; /* 見出し用 */

    /* レイアウト */
    --header-height: 80px;
    --header-height-mobile: 60px;
    --radius: 8px;
    --transition-base: 0.3s ease;
}

/* === 2. 基本スタイル === */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    line-height: 1.8;
    color: var(--color-text-dark);
    background-color: var(--color-text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

img {
    vertical-align: middle;
}

a {
    transition: opacity var(--transition-base);
}

a:hover {
    opacity: 0.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    line-height: 1.4;
}

.sp-hide {
    display: block;
}

.sp-br {
    display: none;
}

/* === 3. 共通レイアウト (Layout) === */

/* --- 3.1. コンテナとセクション --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.container--narrow {
    max-width: 800px;
}

.section {
    padding: 80px 0;
}

/* --- 3.2. タイトルのテキスト --- */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--color-main);
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

/* --- 3.3. 背景色ユーティリティ --- */
.bg-light-gray {
    background-color: var(--color-bg-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.bg-main-color {
    background-color: var(--color-main);
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.bg-main-color .section-title {
    color: var(--color-text-light);
}

/* --- 3.4. ボタンコンポーネント --- */
.section-link {
    text-align: center;
    margin-top: 40px;
}

/* ボタン(青) */
.cta-btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.cta-btn:hover {
    opacity: 1;
}

.cta-btn--outline {
    border-color: var(--color-main);
    color: var(--color-main);
    background-color: transparent;
    position: relative;
    z-index: 1;
}

.cta-btn--outline:hover {
    color: var(--color-text-light);
    background: var(--color-main);
    border-color: var(--color-main);
}

/* ボタン(白) */
.cta-btn--outline--light {
    border-color: var(--color-text-light);
    color: var(--color-text-light);
    background-color: transparent;
}
.cta-btn--outline--light:hover {
    color: var(--color-main);
    background: var(--color-text-light);
    border-color: var(--color-text-light);
}

/* ボタン(黄色) */
.cta-btn--accent {
    background-color: var(--color-accent);
    color: var(--color-text-dark);
}

.cta-btn--accent:hover {
    background-color: var(--color-accent-dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cta-btn--large {
    font-size: 1.1rem;
    padding: 15px 40px;
}

/* === 4. ヘッダー (.header) === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
/* ヘッダー スクロール後 (.is-scrolled) */
.header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.header__inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

/* --- 4.1. ロゴ --- */
.header__logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 1 !important;
}

.header__logo .logo__text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-light);
    transition: color 0.4s ease;
}

.header__logo .logo__icon-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
}

.header__logo .logo__icon {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s ease;
}

.logo__icon--white {
    opacity: 1;
}
.logo__icon--black {
    opacity: 0;
}
/* スクロール後のロゴ切り替え */
.header.is-scrolled .logo__icon--white {
    opacity: 0;
}
.header.is-scrolled .logo__icon--black {
    opacity: 1;
}
.header.is-scrolled .header__logo .logo__text {
    color: var(--color-text-dark);
}

/* --- 4.2. ナビゲーションエリア --- */
.header__right-group {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header__actions {
    display: flex;
    align-items: center;
}

/* --- 4.3. PCナビゲーション --- */
.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list__item a {
    position: relative;
    padding: 5px 0;
    font-weight: 700;
    color: var(--color-text-light);
    transition: color 0.4s ease;
}

.nav-list__item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base), background-color var(--transition-base);
}

.nav-list__item a:hover::after {
    transform: scaleX(1);
}

.nav-list__item a:hover {
    opacity: 1;
}
/* スクロール後のリンク色変更 */
.header.is-scrolled .nav-list__item a {
    color: var(--color-text-dark);
}
.header.is-scrolled .nav-list__item a::after {
    background-color: var(--color-main);
}

/* アクティブ表示 */
.nav-list__item.is-active a {
    color: var(--color-accent);
}
.nav-list__item.is-active a::after {
    transform: scaleX(1);
    background-color: var(--color-accent);
}
.header.is-scrolled .nav-list__item.is-active a {
    color: var(--color-main);
}
.header.is-scrolled .nav-list__item.is-active a::after {
    background-color: var(--color-main);
}

/* --- 4.4. ヘッダーCTA --- */
.header__cta-btn {
    padding: 8px 24px;
    border-radius: 0;
    background-color: transparent;
    border-color: var(--color-text-light);
    color: var(--color-text-light);
}
.header__cta-btn:hover {
    background-color: var(--color-text-light);
    color: var(--color-main);
    transform: none;
    box-shadow: none;
}
/* スクロール後のヘッダーCTAボタン */
.header.is-scrolled .header__cta-btn {
    border-color: var(--color-text-dark);
    color: var(--color-text-dark);
    background-color: transparent;
}
.header.is-scrolled .header__cta-btn:hover {
    background-color: var(--color-main);
    border-color: var(--color-main);
    color: var(--color-text-light);
}
/* アクティブ表示 */
.header__cta-btn.is-active {
    background-color: var(--color-text-light);
    color: var(--color-main);
}
.header.is-scrolled .header__cta-btn.is-active {
    background-color: var(--color-main);
    border-color: var(--color-main);
    color: var(--color-text-light);
}

/* --- 4.5. モバイルメニュー --- */
.nav-toggle {
    display: none;
    width: 24px;
    height: 18px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1510;
    position: relative;
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-text-light);
    border-radius: 3px;
    transition: transform var(--transition-base), background-color var(--transition-base), opacity var(--transition-base);
    position: absolute;
    left: 0;
}

.nav-toggle__bar:nth-child(1) {
    top: 0;
}
.nav-toggle__bar:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}
.nav-toggle__bar:nth-child(3) {
    bottom: 0;
}

/* スクロール後のトグル色変更 */
.header.is-scrolled .nav-toggle__bar {
    background-color: var(--color-text-dark);
}

/* ハンバーガー -> バツ印 のアニメーション */
.header.is-active .nav-toggle__bar:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.header.is-active .nav-toggle__bar:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
}
.header.is-active .nav-toggle__bar:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}
.header.is-active .nav-toggle__bar {
    background-color: var(--color-text-light);
}

.mobile-nav {
    display: none;
}

.mobile-nav-overlay {
    display: none;
}

/* === 5. フッター (.footer) === */

/* --- 5.1. ベースレイアウト --- */
.footer {
    background-color: var(--color-text-dark);
    color: var(--color-text-light);
    padding-top: 50px;
}

.footer__main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
}

.footer__col {
    flex: 1;
}

.footer__col--info {
    flex: 2;
}

.footer__col--nav {
    flex: 2;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 40px;
}

.footer__col--contact {
    flex: 1.5;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 40px;
}

/* --- 5.2. 会社情報 --- */
.footer__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-light); /* ロゴテキストを白に */
    margin-bottom: 20px;
    opacity: 0.95;
}

.footer__logo .logo__icon {
    width: 32px;
    height: 32px;
}

.footer__contact-item {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.6;
    opacity: 0.95;
}

/* --- 5.3. ナビゲーションエリア --- */
.footer__heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text-light);
    opacity: 0.95;
}

.footer-nav-wrapper {
    display: flex;
    gap: 90px;
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-nav-list a {
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.95;
    color: var(--color-text-light);
}

.footer-nav-list a:hover {
    opacity: 1;
    color: var(--color-accent);
}
/* アクティブ表示 */
.footer-nav-list .is-active a {
    color: var(--color-accent);
    opacity: 1;
}

/* --- 5.4. コピーライト --- */
.footer__copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* 区切り線 */
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
}

/* === 6. アニメーション === */
.js-scroll-trigger {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js-scroll-trigger.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === 7. コンタクトCTAセクション (.section-cta) === */
.section-cta {
    text-align: center;
    padding: 100px 0;
}
.cta-section__title {
    font-size: 2.2rem;
    margin-bottom: 15px;
}
.cta-section__subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
}











/* --- レスポンシブ調整 --- */

/* タブレット以下のデバイス */
@media (max-width: 768px) {
    
    .sp-hide {
        display: none;
    }

    .sp-br {
        display: block;
    }

    /* === 3. 共通レイアウト === */
    .section {
        padding: 40px 10px 30px 10px;
    }

    /* --- 3.2. タイトルのテキスト --- */
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 30px;
    }

    .section-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0px;
    }

    /* === 4. ヘッダー === */
    .header {
        height: var(--header-height-mobile);
    }

    .header__inner {
        padding: 0 20px;
    }

    .header__logo a {
        gap: 0;
    }

    .header__logo .logo__icon-wrapper {
        width: 28px; 
        height: 28px;
    }

    .header__logo .logo__text {
        font-size: 1.1rem;
        margin-left: 10px;
    }

    /* ナビゲーション */
    .header__nav {
        display: none; /* PCナビゲーションを非表示 */
    }

    .header__cta-btn {
        display: none;
    }

    .nav-toggle {
        display: block; /* ハンバーガーメニューを表示 */
    }

    /* モバイルナビゲーション */
    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 100vh;
        background-color: var(--color-main);
        background-image: linear-gradient(135deg, var(--color-main) 0%, var(--color-main-dark) 100%);
        z-index: 1500;
        padding: 80px 40px 10px;
        display: flex;
        flex-direction: column;
        transform: translateX(100%);
        transition: transform 0.6s var(--transition-menu);
        overflow-y: auto;
    }

    .is-active .mobile-nav {
        transform: translateX(0);
    }

    /* メニューリンクの時間差アニメーション (スタッガード表現) */
    .mobile-nav__item {
        margin-bottom: 24px;
        opacity: 0;
        transform: translateX(30px);
        transition: all 0.5s ease;
    }

    .is-active .mobile-nav__item {
        opacity: 1;
        transform: translateX(0);
    }

    .is-active .mobile-nav__item:nth-child(1) { transition-delay: 0s; }
    .is-active .mobile-nav__item:nth-child(2) { transition-delay: 0.05s; }
    .is-active .mobile-nav__item:nth-child(3) { transition-delay: 0.1s; }
    .is-active .mobile-nav__item:nth-child(4) { transition-delay: 0.15s; }
    .is-active .mobile-nav__item:nth-child(5) { transition-delay: 0.2s; }

    .mobile-nav__link {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--color-text-light);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-nav__link::after {
        content: '→';
        font-size: 1.2rem;
        opacity: 0.4;
    }

    .mobile-nav__cta {
        display: block;
        width: 100%;
        padding: 8px 24px;
        background-color: var(--color-accent);
        color: var(--color-text-dark);
        text-align: center;
        border-radius: var(--radius);
        font-weight: 700;
        margin-top: 10px;
        margin-bottom: 30px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    /* オーバーレイ */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999; /* header(1000)より下 */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        cursor: pointer;
    }

    .mobile-nav-overlay.is-active {
        opacity: 1;
        visibility: visible;
    }

    /* === 5. フッター === */
    .footer {
        padding-top: 20px;
    }

    .footer__main {
        flex-direction: row; /* 横並び */
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
        padding-bottom: 10px;
    }

    /* ロゴエリア (左上) */
    .footer__col--info {
        width: auto;
        flex: 0 0 auto;
        margin-bottom: 0;
        order: 1;
    }

    .footer__logo {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .footer__logo .logo__icon {
        width: 24px;
        height: 24px;
    }

    .footer__logo .logo__text {
        font-size: 0.9rem;
    }

    /* サイトマップ (非表示) */
    .footer__col--nav {
        display: none;
    }

    /* お問い合わせ情報 (右側) */
    .footer__col--contact {
        width: auto;
        flex: 0 0 auto;
        margin-bottom: 0;
        padding-top: 30px;
        padding-left: 0;
        border-left: none;
        text-align: right;
        order: 2;
    }

    .footer__col--contact .footer__heading {
        display: none;
    }

    .footer__contact-item {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .footer__copyright {
        padding: 10px;
    }

    /* === 7. コンタクトCTAセクション === */
    .section-cta {
        padding: 40px 10px 30px 10px;
    }

    .cta-section__title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
 
    .cta-section__subtitle {
        font-size: 0.8rem;
        margin-bottom: 20px;
    }

    .section-cta .cta-btn {
        padding: 8px 24px;
        font-size: 0.85rem;
    }
}