@charset "utf-8";
/* CSS Document */


/**
 * style.css
 * オノガワ精機 リニューアルサイト用スタイル
 * 最終更新: スマホ版レイアウト最適化・余白調整済み
 */

/* ==========================================================================
   基本設定
   ========================================================================== */
:root {
    --color-bg: #1a1a1a;
    --color-text-main: #333;
    --color-accent-blue: #005bac;
    --color-logo-green: #a2d067;
    --color-gray: #f4f4f4;
    --color-dark-gray: #333;
    --font-main: 'Noto Sans JP', sans-serif;
    --font-serif: 'Noto Serif JP', serif;
    --container-width: 1080px; /* PC版のコンテンツ幅 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    line-height: 1.8;
    background-color: #fff;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; vertical-align: middle; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 30px;
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */
header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 80px; display: flex; align-items: center;
    border-top: var(--color-logo-green) 2px solid;
}
.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 0 40px; gap: 30px;
}
.logo img { height: 40px; width: auto; }
.nav-menu { flex: 1; }
.nav-menu ul { display: flex; gap: 25px; align-items: center; justify-content: flex-start; }
.nav-menu a { font-weight: 700; font-size: 14px; letter-spacing: 0.05em; color: var(--color-dark-gray); }

/* ホバー色をロゴの黄緑に変更 */
.nav-menu a:hover { color: var(--color-logo-green); }

/* SDGsロゴ */
.header-sdgs { flex-shrink: 0; display: flex; align-items: center; height: 80px; padding: 4px 0; }
.header-sdgs img { height: 100%; width: auto; display: block; }

/* ハンバーガーメニューアイコン */
.menu-trigger {
    display: none; cursor: pointer; width: 30px; height: 20px;
    position: relative; z-index: 1001;
}
.menu-trigger span {
    display: block; width: 100%; height: 2px;
    background: var(--color-dark-gray);
    position: absolute; transition: 0.4s;
}
.menu-trigger span:nth-child(1) { top: 0; }
.menu-trigger span:nth-child(2) { top: 9px; }
.menu-trigger span:nth-child(3) { top: 18px; }

.menu-trigger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-trigger.active span:nth-child(2) { opacity: 0; }
.menu-trigger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ==========================================================================
   メインビジュアル
   ========================================================================== */
.mv-section { background-color: #000; position: relative; overflow: hidden; }
.swiper { width: 100%; max-width: 1280px; height: 600px; margin: 0 auto; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.mv-logo {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 10; pointer-events: none; width: 35%; opacity: 0.8;
}

/* ==========================================================================
   導入・要約
   ========================================================================== */
.intro-section { padding: 80px 0; background: #fafafa; }
.intro-box {
    background: #fff; border: 1px solid #eee; padding: 60px;
    text-align: center; margin: 0 auto 80px; max-width: 960px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}
.intro-box .summary-line { font-size: 15px; font-weight: 700; color: var(--color-accent-blue); letter-spacing: 0.15em; margin-bottom: 20px; display: block; }
.intro-box h2 { font-size: 26px; margin-bottom: 30px; line-height: 1.6; }
.intro-box p.desc { font-size: 16px; color: #555; text-align: left; max-width: 800px; margin: 0 auto; line-height: 2.2; }

/* 3つの特徴ナビ */
.feature-nav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-nav-item { text-align: center; }
.feature-nav-item .img-box { position: relative; overflow: hidden; aspect-ratio: 16/10; margin-bottom: 12px; border: 1px solid #eee; border-radius: 10px; }
.feature-nav-item .img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.feature-nav-item .label-band { position: absolute; bottom: 15%; left: 0; width: 100%; background: rgba(255, 255, 255, 0.7); color: #000; font-weight: 700; padding: 10px 0; font-size: 17px; letter-spacing: 0.1em; }
.feature-nav-item .caption { font-size: 13px; color: #777; display: block; padding: 0 10px; line-height: 1.6; }

/* ==========================================================================
   セクション見出し（背景固定）
   ========================================================================== */
.section-title-wrap {
    height: 300px; /* 【1】ここを「200px」や「250px」に下げると、画像が見える範囲が狭まりズーム感が和らぎます */
    position: relative;
    background-size: cover; /* 【2】これを消すと画像は実寸になりますが、隙間ができるので基本はcoverのまま、上のheightで調整するのが正解です */
    background-position: center; /* 【3】火花のいいところが見えない場合、「top」や「bottom」に変えると上下にずらせます */
    background-attachment: fixed; /* これが「背景固定」の命令です。スマホでは自動で無効になる設定を後述しています */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 80px;
}
.section-title-wrap::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); }
.section-title { position: relative; color: #fff; text-align: center; }
.section-title h2 { font-size: 40px; letter-spacing: 0.15em; }


/* ==========================================================================
   事業内容・ワークフロー
   ========================================================================== */
.service-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-bottom: 60px; }
.service-item { display: flex; flex-direction: column; background: #fff; border: 1px solid #ddd; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.service-item .service-img { flex: none; width: 100%; aspect-ratio: 4/3; }
.service-item .service-img img { width: 100%; height: 100%; object-fit: cover; }
.service-item .service-body { flex: 1; padding: 20px 22px 24px; display: flex; flex-direction: column; }
.service-item h3 { margin-bottom: 12px; font-size: 18px; color: var(--color-dark-gray); position: relative; padding-bottom: 12px; }
.service-item h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 35px; height: 3px; background: var(--color-accent-blue); }

.workflow-box { background: #fafafa; padding: 100px 30px; border: 1px solid #eee; margin-bottom: 2rem;}
.workflow-box h3 { text-align: center; margin-bottom: 60px; font-size: 26px; letter-spacing: 0.1em; }
.workflow-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px 15px; position: relative; }
.step-card { position: relative; text-align: center; }
.step-image { width: 100%; aspect-ratio: 3/2; overflow: hidden; background: #eee; margin-bottom: 12px; border: 1px solid #ddd; }
.step-info .name { font-size: 14px; font-weight: 700; line-height: 1.5; }
.step-card::after { content: '▶'; position: absolute; top: 25%; right: -10px; color: #ddd; font-size: 14px; }
.step-card:nth-child(5n)::after { display: none; }

/* 複合加工例ボックス */
.service-example {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    background: #f3f8ee;
    border: 1px solid #c8e0a4;
    border-radius: 8px;
    padding: 32px 36px;
    margin-bottom: 100px;
}
.example-img {
    flex: 0 0 44%;
    background: #fff;
    border-radius: 5px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.example-img img { width: 100%; height: auto; display: block; }
.example-body { flex: 1; }
.example-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-accent-blue);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-logo-green);
}
.example-body p { font-size: 14px; line-height: 1.95; color: #444; }

/* ==========================================================================
   設備リスト
   ========================================================================== */
.equipment-container { overflow-x: auto; margin-bottom: 100px; }
.equipment-table { width: 100%; border-collapse: collapse; min-width: 850px; font-size: 15px; }
.equipment-table th, .equipment-table td { padding: 18px; border: 1px solid #eee; text-align: left; }
.equipment-table thead th { background: #333; color: #fff; font-weight: 500; }
.equipment-table .category-row { background: #f5f5f5 !important; font-weight: bold; }

/* ==========================================================================
   プロフィール
   ========================================================================== */

/* 4人写真：セクションタイトルの直下、中央配置 */
.greeting-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 30px 0;
    max-width: var(--container-width);
    margin: 0 auto;
}
.representative-img {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 90px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* 代表者ご挨拶：写真の下に目立つボックスで配置 */
.greeting-text-box {
    width: 100%;
    max-width: 820px;
    background: #fff;
    border-top: 3px solid var(--color-accent-blue);
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 55px 65px 50px;
    margin-bottom: 100px;
}
.greeting-text-box h3 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
    color: var(--color-dark-gray);
}
.greeting-text-box p {
    font-size: 15px;
    line-height: 2.2;
    color: #444;
    margin-bottom: 0;
}
.greeting-name {
    margin-top: 30px;
    text-align: right;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
}

/* 個人プロフィール群 */
.article-content {
    background: #f7f7f7;
    padding: 100px 0 120px;
}
.article-block {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 30px;
}

/* 各記事アイテム：写真＋本文の2カラム */
.article-item {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 50px;
    align-items: start;
    margin-bottom: 100px;
    padding-bottom: 100px;
    border-bottom: 1px solid #e0e0e0;
}
.article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 写真を右に：reverseクラス */
.article-item.reverse {
    grid-template-columns: 1fr 230px;
}
.article-item.reverse .article-photo { order: 2; }
.article-item.reverse .article-body  { order: 1; }

/* 写真をbody内に持つ（グリッドなし・1カラム）*/
.article-item--inline {
    grid-template-columns: 1fr;
}
.article-photo--left {
    float: left;
    width: 38%;
    margin: 0 36px 24px 0;
    clear: left;
}
.article-photo--left img {
    width: 100%;
    display: block;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* メイン写真（カラムの左または右） */
.article-item > .article-photo img {
    width: 100%;
    display: block;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* 本文内に埋め込まれた写真：右フロート */
.article-body .article-photo {
    float: right;
    width: 48%;
    margin: 4px 0 24px 32px;
    clear: right;
}
.article-body .article-photo img {
    width: 100%;
    display: block;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.article-body::after {
    content: '';
    display: block;
    clear: both;
}

/* 本文のタグ */
.article-body h4 {
    font-size: 16px;
    letter-spacing: 0.18em;
    color: var(--color-accent-blue);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.midasi_h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    margin: 48px 0 16px;
    padding-left: 14px;
    border-left: 3px solid var(--color-accent-blue);
    clear: both;
}
.article-body p {
    font-size: 15px;
    line-height: 2.15;
    color: #444;
    margin-bottom: 16px;
}

/* 先代インタビュー */
.interview-section { margin-top: 20px; }
.interview-heading {
    text-align: center;
    padding: 80px 0 70px;
}
.interview-heading h2 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 0.08em;
    display: inline-block;
    position: relative;
}
.interview-heading h2::after {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: var(--color-accent-blue);
    margin: 14px auto 0;
}

/* ==========================================================================
   製品ギャラリー
   ========================================================================== */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 80px;
}
.gallery-item-wrap {
    display: flex;
    flex-direction: column;
}
.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #0a0a0a;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease, opacity 0.45s ease;
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.gallery-overlay::before {
    content: '';
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 50%;
}
.gallery-overlay::after {
    content: '+';
    position: absolute;
    color: #fff;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}
.gallery-item:hover img {
    transform: scale(1.06);
    opacity: 0.75;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.item-caption {
    font-size: 10.5px;
    color: #777;
    line-height: 1.7;
    padding: 9px 2px 0;
}

/* ==========================================================================
   会社概要
   ========================================================================== */

/* ロゴ */
.about-top-logo {
    text-align: center;
    margin-bottom: 50px;
}
.about-top-logo img {
    max-width: 320px;
    height: auto;
}

/* スローガン・社訓・経営方針 3カラム */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}
.philosophy-item {

    padding: 24px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}
.philosophy-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 企業行動規範 */
.code-of-conduct {
    text-align: center;
    margin-bottom: 60px;
}
.code-of-conduct img {
    max-width: 100%;
    height: auto;
}

/* 会社情報テーブル＋地図：縦積み・中央寄せ */
.company-info {
    display: flex;
    flex-direction: column;
    gap: 50px;
    max-width: var(--container-width);
    margin: 0 auto 80px;
    padding: 0 30px;
}
.info-table {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 0;
    font-size: 14px;
    border-top: 1px solid #e0e0e0;
}
.info-table dt,
.info-table dd {
    padding: 13px 10px;
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
    line-height: 1.7;
}
.info-table dt {
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    padding-right: 20px;
}
.info-table dd a {
    color: var(--color-accent-blue);
    text-decoration: underline;
}
.company-info iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}

/* SDGs・パートナーシップ */
.sdgs-section {
    padding: 60px 0;
    text-align: center;
}
.sdgs-banner img {
    max-width: 500px;
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .philosophy-grid { grid-template-columns: 1fr; gap: 16px; }
    .company-info { padding: 0 15px; gap: 30px; }
    .company-info iframe { height: 280px; }
    .info-table { font-size: 13px; grid-template-columns: 38% 62%; }
    .info-table dt { white-space: normal; padding-right: 10px; }
    .info-table dd { font-size: 13px; }

}

/* ==========================================================================
   フッター
   ========================================================================== */
footer { background: #e8e8e8; padding-top: 60px; }
.footer-content { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding: 0 40px; align-items: start; max-width: var(--container-width); margin: 0 auto 60px; }
.footer-col-info .footer-catchcopy { font-size: 13px; color: #555; margin-bottom: 14px; line-height: 1.7; }
.footer-col-info .footer-logo { margin-bottom: 18px; }
.footer-col-info .footer-logo img { max-width: 200px; }
.footer-address { font-size: 13px; color: #444; margin-bottom: 24px; display: grid; grid-template-columns: 3.5em 1fr; row-gap: 6px; }
.footer-address dt { font-weight: 700; color: #333; }
.footer-address dd { margin: 0; word-break: break-all; }
.btn-contact { display: inline-block; background: var(--color-accent-blue); color: #fff; padding: 10px 22px; border-radius: 4px; font-size: 13px; font-weight: 700; text-decoration: none; transition: opacity 0.3s; }
.btn-contact:hover { opacity: 0.8; }
.footer-col-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.footer-map-caption { font-size: 12px; font-weight: 700; color: #555; margin-bottom: 10px; line-height: 1.7; }
.footer-col-map img { width: 100%; border-radius: 4px; display: block; }
.copyright { background: #444; color: #fff; text-align: center; padding: 22px 20px; font-size: 13px; letter-spacing: 0.05em; }
#page-top { position: fixed; bottom: 40px; right: 40px; background: var(--color-dark-gray); color: #fff; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 99; opacity: 0; visibility: hidden; transition: 0.3s; font-size: 10px; font-weight: bold; }

/* ==========================================================================
   レスポンシブ (スマホ 768px以下)
   ========================================================================== */
@media (max-width: 1299px ){
    .workflow-grid { grid-template-columns: repeat(3, 1fr); }
}

/* タブレット以下（1024px）: ハンバーガーナビ */
@media (max-width: 1024px) {
    header { height: 60px; }
    .header-inner { padding: 0 15px; height: 100%; gap: 0; }
    .logo img { height: 30px; }
    .header-sdgs { display: none; }
    .menu-trigger { display: block; }
    .nav-menu {
        position: fixed; top: 60px; right: -100%; width: 80%; height: calc(100vh - 60px);
        background: #fff; padding: 40px 20px; transition: 0.4s;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    .nav-menu.active { right: 0; }
    .nav-menu ul { flex-direction: column; align-items: flex-start; gap: 20px; }
    .nav-menu a { font-size: 16px; width: 100%; display: block; padding-bottom: 10px; border-bottom: 1px solid #eee; }
    .nav-menu a.btn-nav-contact { background: var(--color-accent-blue); text-align: center; border-bottom: none; margin-top: 10px; }
}

@media (max-width: 768px) {
    /* 指示に基づき左右余白を8pxまで縮小 */
    .container { padding: 0 8px !important; }

    .swiper { height: 350px; }
    .mv-logo { width: 70%; }

    .intro-section { padding: 40px 0; }
    .intro-box { padding: 30px 15px; margin-bottom: 40px; }
    .intro-box h2 { font-size: 20px; margin-bottom: 20px; line-height: 1.4; }
    .intro-box p.desc { font-size: 14px; line-height: 1.8; }

    .feature-nav-grid { grid-template-columns: 1fr; gap: 30px; }
    
    /* スマホで見出し背景のズームを抑えるため高さを低く設定 */
    .section-title-wrap { height: 160px; margin-bottom: 40px; background-attachment: scroll; }
    .section-title h2 { font-size: 28px; }
    
    /* 複合加工例ボックス スマホ版 */
    .service-example { flex-direction: column; gap: 20px; padding: 22px 18px; margin-bottom: 60px; }
    .example-img { flex: none; width: 100%; }

    /* 事業内容カード */
    .service-item .service-body { padding: 12px 12px 16px; }
    .service-item h3 { font-size: 14px; margin-bottom: 8px; }
    .service-item p { font-size: 12px; line-height: 1.7; }
    
    /* ワークフロー */
    .workflow-box { padding: 60px 10px; }
    .workflow-grid { grid-template-columns: repeat(2, 1fr); gap: 25px 10px; }
    .workflow-box h3 { font-size: 20px; margin-bottom: 30px; line-height: 1.2; }
    .step-info .name { font-size: 12px; line-height: 1.4; }
    .step-card::after { display: none !important; }
    
    /* プロフィール スマホ版 */
    .greeting-section { padding: 50px 15px 0; }
    .representative-img { margin-bottom: 50px; }
    .greeting-text-box { padding: 30px 22px 28px; margin-bottom: 60px; }
    .greeting-text-box h3 { font-size: 17px; }
    .greeting-text-box p { font-size: 14px; line-height: 1.95; }
    .article-content { padding: 60px 0 80px; }
    .article-block { padding: 0 15px; }
    .article-item {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 60px;
        padding-bottom: 60px;
    }
    .article-item.reverse .article-photo { order: 1; }
    .article-item.reverse .article-body  { order: 2; }
    .article-body .article-photo { float: none; width: 100%; margin: 20px 0; }
    .article-photo--left { float: none; width: 100%; margin: 0 0 20px; }
    .midasi_h3 { font-size: 16px; margin: 32px 0 12px; }
    .article-body p { font-size: 14px; line-height: 1.95; }
    .interview-heading { padding: 50px 0 40px; }
    .interview-heading h2 { font-size: 18px; }

    /* 製品ギャラリー スマホ版 */
    .product-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 50px;
    }
    .gallery-item { pointer-events: none; cursor: default; }
    .item-caption { font-size: 9px; padding: 6px 2px 0; }

    .footer-content { grid-template-columns: 1fr; padding: 0 8px; gap: 30px; margin-bottom: 40px; }
    .footer-col { max-width: 480px; width: 100%; margin: 0 auto; }
    .footer-col-photo img,
    .footer-col-map img { width: 100%; }
    .philosophy-item {
    width:70%;
    margin: 0 auto;
}
}

@media (max-width: 480px) {
    .footer-col { max-width: 100%; }

}