/* ==========================================================
   1. Variables & Reset
   ========================================================== */


/* Googlrfonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Noto+Serif+JP:wght@200..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');


:root {
    /* Colors */
    --color-mainbg: #111111;
    --color-bg: #222222;
    --color-white: #FFFFFF;
    --color-blue: #019bd8;
    --color-accent-blue: #019bd8; /* ホバーバー用の色 */
    
    /* Fonts */
    --font-main: "Roboto", "Noto Sans JP", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* 横スクロールバーを強制的に消去 */
    overflow-x: clip;
    width: 100%;        /* 幅を画面ぴったりに固定 */
    font-family: var(--font-main);
    color: var(--color-white);
    background-color: var(--color-mainbg); /* ページ背景（任意） */
    line-height: 1.6;
}

/* bodyに対してPCのヘッダー高さ 120px 分を空ける */
body {
    padding-top: 109px;
}

/* メインコンテンツ全体にもはみ出し防止をかける */
main {
    width: 100%;
    overflow: hidden;
}

/* メニュー展開時のスクロール防止 */
body.nav-open { overflow: hidden; }

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* ==========================================================
   2. Header (Height: 120px)
   ========================================================== */
.l-header {
    position: fixed; /*fixedでヘッダー固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 110px;
    background-color: var(--color-mainbg);
    display: flex;
    align-items: center;
    padding: 0 80px;
    z-index: 1000;
}

.l-header__inner {
    /* max-width: 1440px; */
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Area */
.c-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.c-logo__icon {
    width: auto;
    height: 53px;
    object-fit: contain;
}

/* Navigation & Lang Switcher Wrapper */

/* --- PC Navigation (835px以上) --- */
@media only screen and (min-width: 835px) {
    .c-nav {
        display: flex;
        align-items: center;
        gap: 40px;
    }

    .c-nav__list {
        display: flex;
        gap: 35px;
        align-items: center;
    }

    .c-nav__link {
        font-size: 16px;
        font-weight: 500;
        color: var(--color-white);
        position: relative;
        padding: 5px;
        display: inline-block; /* 擬似要素の位置調整のため */
    }

    /* ホバー時にゆっくりついてくる青いバー */
    .c-nav__link::after {
        content: "";
        position: absolute;
        bottom: 0; /* メニューの下に配置 */
        left: 0;
        width: 0;      /* 初期状態は幅0 */
        height: 3px;   /* 指定の縦幅 */
        background-color: var(--color-accent-blue);
        transition: width 0.4s ease-in-out; /* ゆっくりついてくるアニメーション */
    }

    .c-nav__link:hover::after,
    .c-nav__link.is-active::after
    {
        width: 100%;   /* マウスオーバーと、アクティブ時に文字幅いっぱいまで広がる */
    }

    /* Contact Button */
    .c-btn-contact {
        /* display: flex;
        width: 155px;
        height: 45px; */
        background-color: var(--color-blue);
        justify-content: center;
        align-items: center;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: 0.9px;
        color: var(--color-white);
        transition: opacity 0.3s;
        padding: 10px 30px;
        margin-left: 50px; /* メニューとコンタクトボタンとの間隔 */
    }

    .c-btn-contact:hover {
    background: var(--color-white);
    color: var(--color-accent-blue);
    /* border-color: #FFFFFF; ホバー画像を反映 */
    transform: translateY(-2px);
    }

    .hamburger, .black_bg { display: none; }
}

/* Language Switcher */
.c-lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--color-white);
}

.c-lang-switcher__current {
    display: flex;
    align-items: center;
    gap: 7px;
}

.c-lang-switcher__label {
    font-size: 16px;
    font-weight: 500;
}

.c-lang-switcher__icon {
    width: 13px !important;  
    height: auto; 
    display: block;
    flex-shrink: 0;         /* 親要素の圧縮を防ぐ */
}

.c-lang-switcher__dropdown {
    position: absolute;
    /* ドロップダウン位置調整 */
    top: 100%;   /* 上からの位置（100%で日本語の真下） */
    left: 0px;   /* 左からの位置（数値を増やすと右に、マイナスにすると左に動く） */
    background: #444;
    padding: 10px 0;
    display: none;
    z-index: 1100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.c-lang-switcher:hover .c-lang-switcher__dropdown {
    display: block;
}

.c-lang-switcher__item a {
    display: block;
    padding: 10px 20px;
    white-space: nowrap;
    font-size: 14px;
}

.c-lang-switcher__item a:hover {
    background-color: var(--color-blue);
}

/* ロゴ周りの「角丸の白い枠」を完全に消去する */
.c-logo,
.c-logo a,
.c-logo__icon {
    background: transparent !important;      /* 背景を透明にする */
    background-color: transparent !important;
    border: none !important;                /* 枠線を消す */
    border-radius: 0 !important;            /* 角丸を解除する */
    box-shadow: none !important;            /* 影（枠に見えるもの）を消す */
    padding: 0 !important;                  /* 余白をリセットする */
    outline: none !important;               /* フォーカス時の枠を消す */
}

/* ==========================================================
   3. Mobile Menu (Hamburger Logic: 834px以下)
   ========================================================== */
@media only screen and (max-width: 834px) {
    body {
        /* モバイルではモバイルのヘッダー高さ 80px 分を空ける */
        padding-top: 79px;
    }
    
    .l-header {
        height: 80px;
        padding: 0 20px;
     }

    /* メニュー本体（z-indexを調整） */
    .c-nav {
        position: fixed;
        right: -320px; /* 初期状態は右外 */
        top: 0;
        width: 305px;
        height: 100vh;
        padding-top: 8em;
        background-color: #222; /* 基本コードの背景色 */
        transition: all .6s;
        z-index: 2000; /* 重なり順を最上位に */
        overflow-y: auto;
    }

    /* メニュー展開時（JSと連動） */
    .nav-open .c-nav { right: 0; }

    .c-nav__list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .c-nav__link {
        display: block;
        padding: 15px 30px;
        color: #fff;
        font-weight: 600;
        font-size: 16px;
    }
    .c-nav__link::after { display: none; }

    .c-btn-contact {
        display: inline-flex;
        margin: 20px auto;
        width: 200px;
        height: 45px;
        background-color: var(--color-blue);
        color: var(--color-white);
        justify-content: center;
        align-items: center;
    }

    /* ハンバーガーボタン */
    .hamburger {
        position: absolute;
        right: 15px;
        top: 20px; /* 上下中央配置 */
        width: 40px;
        height: 40px;
        cursor: pointer;
        z-index: 2100;
    }

    .hamburger_border {
        position: absolute;
        left: 5px;
        width: 25px;
        height: 3px;
        background-color: var(--color-white);
        transition: all .6s;
    }
    .hamburger_border_top { top: 16px; }
    .hamburger_border_center { top: 23px; }
    .hamburger_border_bottom { top: 30px; }

    /* アニメーション */
    .nav-open .hamburger_border_top { transform: rotate(45deg); top: 20px; }
    .nav-open .hamburger_border_center { width: 0; left: 50%; }
    .nav-open .hamburger_border_bottom { transform: rotate(-45deg); top: 20px; }

    /* 背景暗幕 */
    .black_bg {
        position: fixed;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        z-index: 1900;
        background-color: #000;
        opacity: 0;
        visibility: hidden;
        transition: all .6s;
    }
    .nav-open .black_bg { opacity: 0.6; visibility: visible; }
}

/* ==========================================================
   4. Footer
   ========================================================== */
.l-footer {
    background-color: var(--color-mainbg);
    padding: 40px 100px 10px;
    color: var(--color-white);
}

.l-footer__inner {
    /* max-width: 1440px; */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.l-footer__info {
    max-width: 500px;
}

.l-footer__logo-group {
    margin-bottom: 30px;
}

/* Secondary Logo with white background */
.l-footer__kyoshin-logo {
    display: block;
    width: 304px;
    height: 61px;
    background-color: var(--color-white);
    padding: 5px;
    margin-top: 20px;
    object-fit: contain;
}

.l-footer__address {
    font-size: 14px;
    line-height: 1.8;
    margin-top: 25px;
    font-style: normal; /* Address normal weight */
}

/* Footer Navigation */
.l-footer__nav {
    display: flex;
    gap: 80px;
}

.l-footer__nav-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

/* Footer Main Links (16px / 700) */
.l-footer__nav-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-white);
}

/* Footer Sub Links (14px / 500) 
   Target: HISTORY, PHILOSOPHY, DATA, PRIVACY POLICY */
.l-footer__nav-link--sub {
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
}

.l-footer__nav-link:hover {
    opacity: 0.7;
}

/* Copyright Area */
.l-footer__copyright {
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #A6A6A6;
    padding-top: 30px;
    line-height: 1.5;
    font-size: 14px;
}

/* --- footer Responsive --- */
@media (max-width: 1280px) {
    /* コンテナ幅を100%に変更 */
    .l-footer__inner { width: 100%; padding: 0; }
}

@media (max-width: 834px) {
    /* 834pxを基準にフッター要素を縦並び */
    /* モバイルヘッダーの padding: 0 20px と完全に同期させる修正 */
    .l-footer { padding: 60px 20px 30px; }
    .l-footer__inner {
        flex-direction: column;
        align-items: center; /* 中央寄せ */
        text-align: center;
        gap: 40px;
        padding: 0; 
    }
    .l-footer__nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    /* スマホ専用の余白調整 */
    .l-footer { padding: 40px 20px; }
    .l-footer__kyoshin-logo { width: 100%; height: auto; }
}

/* ==========================================================
   5. Contact CTA Section (BEM: c-cta))
   ========================================================== */
.c-cta {
    width: 100%;
    padding: 100px 80px; /* ヘッダー・フッター(80px)と同期 */
    background: url('../images/contact-cta.jpg') no-repeat center center / cover;
    color: var(--color-white);
}

.c-cta__inner {
    /* max-width: 1440px; */
    width: 1200px;
    margin: 0 auto;
    padding: 0; /* 二重余白防止のため 0 に設定 */
}

/* タイトルエリア（デザイン画像に基づき左寄せ） */
.c-cta__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
}

.c-cta__title {
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--color-white);
}

.c-cta__line {
    width: 40px;
    height: 5px;
    background: var(--color-blue);
}

/* コンテンツエリア（中央寄せ） */
.c-cta__content {
    text-align: center;
}

.c-cta__description {
    /* font-family: "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-white); */
    line-height: 25px;
    margin-bottom: 30px;
}

.c-cta__tel-box {
    margin-bottom: 40px;
}

.c-cta__tel-link {
    font-family: "Roboto", sans-serif;
    font-size: 40px;
    font-weight: 800;
    line-height: 40px;
    color: var(--color-white);
    text-decoration: none;
}

.c-cta__btn-wrapper {
    display: flex;
    justify-content: center; /* ボタンを中央配置 */
}

.c-cta__btn {
    display: inline-flex;
    width: 418px;
    max-width: 100%; /* スマホ時にはみ出さないよう設定 */
    height: 71px;
    background: var(--color-blue);
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    font-family: "Roboto", sans-serif;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-decoration: none;
    border: 2px solid transparent; /* ホバー時の枠線用 */
    transition: all 0.3s ease;
}

.c-cta__btn:hover {
    background: var(--color-white);
    color: var(--color-accent-blue);
    /* border-color: #FFFFFF; ホバー画像を反映 */
    transform: translateY(-2px);
}

/* --- CTA Responsive --- */
@media (max-width: 834px) {
    /* モバイル基準(20px)に同期 */
    .c-cta { padding: 80px 20px; }
    
    .c-cta__title { font-size: 24px; }
    
    .c-cta__tel-link { 
        font-size: 32px; /* スマホ向けにサイズ縮小 */
        line-height: 1.2;
    }
    
    .c-cta__btn {
        height: 60px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .c-cta__tel-link { font-size: 26px; }
}

/* ==========================================================
   6. 404 Error Page
   ========================================================== */
.error-404-container {
    background-color: #212121;
    width: 100%;
    overflow-x: hidden;
}

.error-content {
    text-align: center;
    padding: 150px 80px;
}

.error-content__title {
    margin-top: 0;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--color-white);
}

.error-content__text {
    margin-bottom: 40px;
    line-height: 1.6;
    color: var(--color-white);
}

.btn-back__link {
    display: inline-block;
    padding: 15px 40px;
    background: var(--color-blue);
    color: var(--color-white); ;
    text-decoration: none;
    /* border-radius: 5px;  /* 角丸 */
    font-weight: 700;
    transition: 0.3s; 
}

.btn-back__link:hover {
    background: var(--color-white) !important;
    color: var(--color-accent-blue) !important;
    transform: translateY(-2px);                
    opacity: 1;                            
}

/* --- 404 Responsive (834px基準) --- */
@media (max-width: 834px) {
    .error-content {
        padding: 100px 20px; /* モバイル基準の 20px に同期 */
    }
}

/* ==========================================================
    7. Animations & Page Top Button
   ========================================================== */

/* 1. ページ表示時のフェードイン */
body {
    animation: fadein 3s forwards;
}
@keyframes fadein {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* 2. スクロール浮き上がりの初期状態 */
.fadeInUp {
    opacity: 0;
    transform: translateY(40px);
}

/* クラスが付与された時の動き */
.fadeIn {
    animation-name: fadeInAnimation;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
}
@keyframes fadeInAnimation {
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. ページトップボタンのスタイル（修正：z-index強化と背景色変更） */
.pagetop {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 50px;
    height: 50px;
    /* background-color: #fff;
    border: 2px solid #68A5D9;
    border-radius: 50%; */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 修正：最前面に表示されるよう強化 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.6s ease;
    text-decoration: none;
    cursor: pointer;
}

.pagetop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 4. ボタン内の矢印デザイン（修正：footer.phpのクラス名に合わせる） */
.pagetop__arrow {
    display: block;
    width: 15px;
    height: 15px;
    border-top: 3px solid #68A5D9;
    border-right: 3px solid #68A5D9;
    transform: rotate(-45deg);
    margin-top: 6px; /* 矢印の位置を中央に寄せる */
}


/* Responsive */
@media (max-width: 1024px) {
    .c-btn-contact {
        margin-left: 20px;
    }
    .l-header {
        padding: 0 40px;
    }
    .c-nav__list {
        gap: 20px;
    }
    .c-btn-contact {
        padding: 8px 30px;
    }
}


@media (max-width: 834px) {
    .c-nav__list {
        gap: 0px;
    }
    .p-home-info__box {
        width: 100%;
    }
    .pagetop {
        background: rgba(0,0,0,0.6);
    }
    .c-lang-switcher {
        padding-top: 40px;
    }
}

@media (max-width: 480px) {
    .p-home-nav,
    .p-home-info {
        padding: 0;
    }
    .p-home-hero__text {
        font-size: 15px!important;
        font-weight: bold;
        line-height: 1.6!important;
    }
    .c-logo__icon {
        height: 40px;
    }
    .l-footer__nav {
        gap: 50px;
    }
}
