@charset "UTF-8";

/* ==================================================
   基本設定
   ================================================== */
:root {
    --primary-color: #003366;    /* 濃紺 */
    --secondary-color: #4a5d75;  /* ブルーグレー */
    --accent-color: #d35400;     /* オレンジ */
    --text-color: #333333;       /* 文字色 */
    --light-bg: #f5f7fa;         /* 薄い背景 */
    --white: #ffffff;
    --border-color: #dddddd;
    --base-font: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

body {
    font-family: var(--base-font);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    -webkit-text-size-adjust: 100%; /* スマホでの文字サイズ自動調整を防止 */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* 画像のレスポンシブ化：HTMLでwidth指定があっても画面幅に収める */
img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* ==================================================
   ヘッダー (PC / Base)
   ================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

#logo a {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

/* PC用ナビゲーション */
.pc-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pc-nav ul li {
    margin-left: 20px;
}

.pc-nav ul li a {
    color: var(--text-color);
    font-weight: bold;
    font-size: 15px;
    display: block;
    padding: 10px 5px;
}

.pc-nav ul li a:hover {
    color: var(--accent-color);
}

/* ハンバーガーボタン (PCでは非表示) */
.menu-btn {
    display: none;
}

/* ==================================================
   スマホ用ナビゲーション (初期状態は非表示)
   ================================================== */
.mobile-nav {
    display: none; /* JSでクラスが付与されたら表示 */
    position: fixed;
    top: 80px; /* ヘッダーの高さ分空ける */
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 999;
    overflow-y: auto;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid #eee;
}

.mobile-nav li a {
    display: block;
    padding: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: center;
    font-weight: bold;
}

/* ==================================================
   各セクション設定
   ================================================== */
.hero {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    position: relative;
    padding-bottom: 0;
}
.hero img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    opacity: 0.8;
}
.hero .container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}
.hero h2 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 3rem; font-weight: bold; }
.hero p2 { font-size: 1.2rem; font-weight: bold; }


.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    margin-bottom: 40px;
}
.page-header h1 { font-size: 2rem; margin: 0 0 10px 0; }
.page-header p { margin: 0; opacity: 0.8; }

section { padding: 60px 0; }
section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}
section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* トップページ */
.about-us { text-align: center; max-width: 800px; }
.services-digest { background-color: var(--light-bg); }
.service-cards {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}
.card {
    background: var(--white);
    flex: 1;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
.card img { width: 100%; height: 200px; object-fit: cover; }
.card h3 { padding: 15px; margin: 0; color: var(--primary-color); }
.card p { padding: 0 15px 20px; font-size: 0.95rem; }

/* 事業内容 */
.service-detail article {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}
.service-detail article:last-child { border-bottom: none; }
.service-detail h2 { text-align: left; font-size: 1.6rem; border-left: 5px solid var(--accent-color); padding-left: 15px; }
.service-detail h2::after { display: none; }
.service-content { display: flex; gap: 30px; align-items: flex-start; }
.service-content figure { flex: 1; margin: 0; }
.service-content div { flex: 1; }

/* 製造フロー */
.step {
    display: flex;
    align-items: flex-start;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 10px;
}
.step-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    opacity: 0.2;
    margin-right: 20px;
    line-height: 1;
}

/* テーブル（会社概要・採用） */
table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
table th, table td { border: 1px solid var(--border-color); padding: 15px; text-align: left; }
table th { background-color: #f2f2f2; color: var(--primary-color); width: 25%; }

/* フッター */
footer { background-color: #222; color: #ccc; padding: 40px 0 20px; margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; }
.footer-nav ul { list-style: none; padding: 0; }
.footer-nav ul li { display: inline-block; margin-left: 15px; }
.copyright { text-align: center; border-top: 1px solid #444; padding-top: 20px; font-size: 0.8rem; margin-top: 20px;}

/* ==================================================
   ★スマートフォン用レイアウト (768px以下)
   ================================================== */
@media screen and (max-width: 768px) {
    /* ヘッダー */
    .header-inner {
        padding: 0 20px;
        height: 60px;
    }

    #logo a { font-size: 18px; }

    /* PCメニューを消す */
    .pc-nav { display: none; }

    /* ハンバーガーボタンを表示 */
    .menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 24px;
        position: relative;
    }
    .menu-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        position: absolute;
        transition: 0.3s;
    }
    .menu-btn span:nth-child(1) { top: 0; }
    .menu-btn span:nth-child(2) { top: 10px; }
    .menu-btn span:nth-child(3) { top: 20px; }

    /* メニューが開いている時のボタン変形 */
    .menu-btn.active span:nth-child(1) { top: 10px; transform: rotate(45deg); }
    .menu-btn.active span:nth-child(2) { opacity: 0; }
    .menu-btn.active span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

    /* スマホメニュー表示時のスタイル */
    .mobile-nav.active { display: block; }

    /* メインビジュアル */
    .hero img { height: 300px; }
    .hero h2 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }

    /* 事業内容 */
    .service-content { flex-direction: column; }
    .service-content figure { width: 100%; }

    /* テーブルのスマホ化（縦並び） */
    table, tbody, tr, th, td { display: block; width: 100%; }
    table tr { margin-bottom: 20px; border: 1px solid #ddd; }
    table th { width: 100%; box-sizing: border-box; }
    table td { box-sizing: border-box; border-top: none; }

    /* フッター */
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-nav ul { margin-top: 20px; }
    .footer-nav ul li { display: block; margin: 10px 0; }
    
    /* 製造フロー */
    .step { flex-direction: column; }
    .step-number { margin-bottom: 10px; }
    .step-arrow { margin: 10px 0; }
    
    /* フォーム */
    div[style*="display: flex"] { flex-direction: column !important; }
}
/* ==================================================
   ページトップへ戻るボタン
   ================================================== */
#page-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0;           /* 最初は隠しておく */
    transition: opacity 0.3s;
    z-index: 9999;        /* 最前面に表示 */
    pointer-events: none; /* 隠れている時はクリック不可に */
}

/* 表示するクラスがついた時 */
#page-top.show {
    opacity: 1;
    pointer-events: auto; /* クリック可能にする */
}

#page-top a {
    display: block;
}

#page-top img {
    width: 50px;  /* 画像のサイズ調整（必要に応じて変更してください） */
    height: auto;
    cursor: pointer;
    transition: transform 0.3s;
}

/* ホバー時に少し浮き上がる動き */
#page-top img:hover {
    transform: translateY(-5px);
}
/* フッターリンクの色を白にする強制上書き設定 */
footer .footer-nav ul li a {
    color: #ffffff !important;
}

/* ==================================================
   斜め分割画像の合成スタイル
   ================================================== */

/* 1. 画像を重ねるための枠（コンテナ） */
.merged-image-container {
    position: relative; /* 中の画像を絶対配置するための基準 */
    max-width: 600px;   /* 最大幅を600pxに固定 */
    width: 100%;        /* スマホなどでは画面幅に合わせて縮小 */
    /* 幅と高さの比率を 600:400 (3:2) に保つ設定 */
    aspect-ratio: 3 / 2; 
    overflow: hidden;   /* はみ出した部分を隠す */
    margin: 0 auto;     /* 中央寄せ（任意） */
}

/* 2. 2枚の画像の共通設定 */
.merged-image-container img {
    position: absolute; /* コンテナの左上に重ねて配置 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;  /* 画像の比率を崩さずに枠全体を埋める */
}

/* 3. 左側の画像（斜めに切り抜き） */
.image-left {
    /* 左上 → 上辺の60% → 下辺の40% → 左下 の順に点を結んで切り抜く */
    clip-path: polygon(0 0, 100% 0, 0% 100%, 0 100%);
    z-index: 2; /* 手前に表示 */
}

/* 4. 右側の画像（斜めに切り抜き） */
.image-right {
    /* 上辺の60% → 右上 → 右下 → 下辺の40% の順に点を結んで切り抜く */
    /* これで左側の画像の切り残し部分とぴったり合います */
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 1; /* 奥に表示 */
}