@charset "UTF-8";
/*ボタン*/
/* ==========================================
   リンク移動ボタン（画面右端に固定）
   ========================================== */
.linkidou {
    /* スクロールに追従させるため fixed に変更 */
    position: fixed;
    top: 50%;           /* 画面の縦中央に配置 */
    transform: translateY(-50%); /* 縦中央寄せの補正 */
    right: 0;           /* 右端にピタッと寄せる（はみ出し防止） */
    
    /* 画面の約15分の1のサイズ（100 / 15 = 6.66...） */
    width: 6.6vw;       
    min-width: 60px;    /* 小さくなりすぎないよう最小幅を設定 */
    height: auto;       /* 中身のボタンの高さに合わせる */
    z-index: 9999;      /* 常に最前面に表示 */
}

.link {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 各ボタン共通設定 */
.p4, .p5, .p6 {
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 横幅は親（6.6vw）いっぱいに */
    width: 100%;
    /* 縦幅も横幅に比例させる（ここでは横幅の2.5倍程度の高さ） */
    height: 16vw; 
    min-height: 120px;

    font-weight: bold;
    color: #fff;
    border: 1px solid #094;
    box-shadow: -3px 3px #007032; /* 左下方向に影を出す */
    transition: 0.5s ease-in-out;
    background-color: #00e667;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

/* 特別のレイアウト指定 */
.p4 { flex-direction: column; }
.p5, .p6 { flex-direction: row; }

/* 回転の設定 */
.kaiten {
    transform: rotate(90deg);
    white-space: nowrap;
}

.char {
    transform: rotate(270deg);
    display: inline-block;
    text-decoration: underline;
}

/* ホバー設定 */
.p4:hover, .p5:hover, .p6:hover {
    box-shadow: none;
    color: #00e667;
    background-color: #094;
    /* 右に隠れるのではなく、左に少し飛び出す演出 */
    transform: translateX(-5px); 
}

/* スマホ時の調整 */
@media screen and (max-width: 767px) {
    .linkidou {
        width: 15vw; /* スマホでは15分の1だと小さすぎるので少し大きく */
    }
    .p4, .p5, .p6 {
        height: 25vw;
        font-size: 11px;
    }
}

/* ==========================================
   1. ページ全体のコントロール（一番外側の親）
   ========================================== */
.TopPage {
    display: flex;
    flex-direction: column;   /* ページ全体を上から下へ縦並びにする */
    width: 100%;
}

/* ==========================================
   2. メインビジュアル（枠がボタンに被らない設定）
   ========================================== */
.MainVisual {
    width: calc(100% - 8.6vw);
    /* ★ 下の余白を 40px から 15px に縮めて距離を接近させます */
    margin: 0 0 15px 0; 
    border: 2px solid #333333;
    padding: 20px;
    background-color: #ffffff;
    box-sizing: border-box;
}


/* タイトル枠：文字に合わせた長さで中央に置く */
.TitleBox {
    display: table;
    margin: 0 auto 20px auto;
    background-color: #00e667;
    padding: 10px 30px;
    border: 2px solid #333333;
}

.MainTitle {
    font-size: 28px;
    text-align: center;
    margin: 0;
    color: #ffffff;
    text-shadow: 
        -2px -2px 0 #333333,  2px -2px 0 #333333,
        -2px  2px 0 #333333,  2px  2px 0 #333333;
}

.Pictures {
    display: flex;
    gap: 15px;
    width: 100%;
}

.Pictures img {
    /* 枠線(2px×2)と隙間(15px)を考慮して計算 */
    width: calc(50% - 8px); 
    height: auto;
    border: 2px solid #333333;
    box-sizing: border-box;
}
/* ==========================================
   3. 会社案内 & 経営理念（PC時は横並び）
   ========================================== */
.CompanyGuide {
    display: flex;
    flex-direction: row;      /* PC時は横に並べる */
    gap: 30px;                /* 箱と箱の間の隙間 */
    width: auto;              /* 中身の合計幅に合わせる */
    margin-left: 0;
    margin-right: auto;
    box-sizing: border-box;
    padding: 20px;
}

/* 両方の箱に同じ装飾と「画面幅の40%」を適用 */
.CompanyProfile, .ManagementPhilosophy {
    width: 40vw;              
    min-height: 500px;
    box-sizing: border-box;
    background-color: #ffffff;
    padding: 20px;
    color: #333333;
}

/* ==========================================
   4. 文字・見出しの共通スタイル（位置ずらし調整版）
   ========================================== */

/* 共通タイトルの装飾（緑背景＋黒縁） */
.CompanyProfile > .SubTitle:first-child,
.ManagementPhilosophy > .SubTitle:first-child {
    font-size: 26px;
    margin: 10px auto 25px auto;
    width: 90%;
    padding: 8px 0;
    text-align: center; 
    background-color: #00e667;
    border: 2px solid #333333;
    color: #ffffff;
    text-shadow: -1.5px -1.5px 0 #333, 1.5px -1.5px 0 #333, -1.5px 1.5px 0 #333, 1.5px 1.5px 0 #333;
}

/* グレーの見出し枠（役員氏名、未来像など） */
.CompanyProfile .SubTitle:not(:first-child),
.ManagementPhilosophy .SubTitle:not(:first-child) {
    border: 2px solid #333333;
    padding: 6px 12px;
    margin-top: 20px;
    background-color: #f5f5f5;
    font-size: 16px;
    font-weight: bold;
}

/* 内容の枠線（中身を繋げる） */
.CompanyProfile .SubTitle:not(:first-child) ~ h3,
.CompanyProfile .SubTitle:not(:first-child) ~ p,
.ManagementPhilosophy .SubTitle:not(:first-child) ~ p {
    border: 2px solid #333333;
    border-top: none;
    padding: 8px 15px; /* 上下のパディングを少し詰める */
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
}

/* ★役職名（h3）：少し右にずらして控えめに配置 */
h3 {
    font-size: 12px;
    color: #888888;           /* さらに少し薄くして「ラベル」感を出す */
    font-weight: normal;
    margin-left: 15px;        /* ★左に15pxの隙間を作り、右へずらす */
    margin-bottom: -2px;      /* ★名前と密着させる */
    padding: 5px 0 0 0 !important;
}

/* ★氏名・本文（p）：左端からハッキリと配置 */
p {
    font-size: 16px;          /* 名前を少し大きくして強調 */
    font-weight: bold;
    color: #333333;
    margin-left: 0;           /* 左端に揃える */
    padding: 0 0 8px 0 !important;
}

/* 経営理念など、h3がない場所のテキスト調整 */
.ManagementPhilosophy p {
    padding: 10px 0 !important;
    font-weight: normal;      /* 本文は太字解除 */
    font-size: 15px;
}

/* ==========================================
   5. スマホ画面（横幅767px以下）最終統合版
   ========================================== */
@media screen and (max-width: 767px) {
    /* ページ全体の左寄せ */
    .TopPage {
        align-items: flex-start !important;
    }
  
    /* メインビジュアル：高さを抑え、ボタンを避けて左寄せ */
    .MainVisual {
        height: auto !important;
        width: calc(100% - 17vw) !important; /* ボタン回避 */
        margin-left: 0 !important;
        margin-right: auto !important;
        margin-bottom: 10px !important; /* 下との距離を接近 */
        padding: 8px !important;       /* 内側もスリムに */
    }

    /* タイトル枠：高さを35pxに短縮 */
    .TitleBox {
        width: 100% !important;
        height: 35px !important;       /* 縦幅をコンパクトに */
        margin-bottom: 10px !important;
        padding: 0 10px;
        box-sizing: border-box;
        display: block;
    }

    .MainTitle {
        font-size: 15px !important;    /* 枠に合わせて少し縮小 */
        white-space: nowrap;
        line-height: 35px !important;  /* 35pxの真ん中に配置 */
    }

    /* 画像エリア：縦並びと比率の維持 */
    .Pictures {
        margin-top: 5px !important;   /* タイトルとの隙間を最小に */
        height: auto !important; 
        flex-direction: column !important; 
        width: 100% !important;
    }

    .Pictures img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        margin-bottom: 5px !important; /* 画像同士の隙間を5pxに */
        border: 2px solid #333333;
    } 

    /* 会社案内 & 経営理念：ボタンを避けて左寄せ */
    .CompanyGuide {
        flex-direction: column !important;
        width: calc(100% - 17vw) !important; 
        margin-left: 0 !important;
        margin-right: auto !important;
        gap: 20px !important;         /* 箱同士の隙間も40→20に短縮 */
        padding: 5px 0 !important;
    }

    .CompanyProfile, .ManagementPhilosophy {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 15px !important;     /* 内側の余白も少し詰める */
    }

    /* 会社案内エリアの各項目の隙間を短縮 */
    .CompanyProfile .SubTitle:not(:first-child),
    .ManagementPhilosophy .SubTitle:not(:first-child) {
        margin-top: 15px !important;
    }

    /* 各タイトルの文字サイズ調整 */
    .CompanyProfile > .SubTitle:first-child,
    .ManagementPhilosophy > .SubTitle:first-child {
        width: 100%;
        font-size: 24px !important;   /* 少し小さくして圧迫感を軽減 */
        text-align: center;
    }
  
   .linkidou {
        width: 15vw;
        position: fixed;
        top: 50%;
        right: 0;
        /* 元の「真ん中(-50%)」から「ボタン半分(-25vw程度)」分だけ引き上げます */
        /* ボタン1つが約16vw〜25vwなので、その0.5個分を加味した数値です */
        transform: translateY(-75%); 
        z-index: 9999;
    }

}
