/*
Theme Name: Michio Corporation Theme
Author: Michio Corporation
Version: 1.0
Description: ミチオコーポレーション公式サイトのオリジナルテーマです。
*/
@charset "UTF-8";
/* =================================================
   1. 基本設定 & リセット
   ================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", sans-serif; 
    color: #333; 
    line-height: 1.8; 
}
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* 見出し共通 */
.section-title  {
    font-size: 40px; /* 画像に合わせて大きく */
    font-weight: 900;
    text-align: left; /* 画像に合わせて左寄せ（中央ならcenter） */
    margin-bottom: 10px;
    color: #000; /* 真っ黒に */
}

.title-main {
    position: relative;
    display: inline-block;
    z-index: 1;
}

/* ゴールドのマーカー部分 */
.title-main::before {
    content: "";
    position: absolute;
    bottom: 8px; /* 文字の下部からの位置 */
    left: 0;
    width: 100%;
    height: 14px; /* マーカーの太さ */
    /* ゴールドのグラデーション（左から右、または上下） */
    background: linear-gradient(90deg, #c5a044 0%, #dab551 50%, #b38b36 100%);
    z-index: -1; /* 文字の背面に配置 */
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* わずかな立体感 */
}

/* 英語サブタイトル */
.section-sub-en {
    text-align: left; /* 見出しに合わせる */
    color: #000; /* 画像では黒に近い色 */
    margin-bottom: 40px;
    font-size: 24px; /* 画像に合わせて大きく */
    font-weight: bold;
    font-family: sans-serif;
}
/* 日本語サブタイトル */
.section-sub { 
    text-align: left; /* 見出しに合わせる */
    color: #000; /* 画像では黒に近い色 */
    margin-bottom: 40px;
    font-size: 24px; /* 画像に合わせて大きく */
    font-weight: bold;
    font-family: sans-serif;
}

/* =================================================
   2. ヘッダー（中央ロゴ & 左右分割ナビ）
   ================================================= */
.site-header { padding: 20px 0; background-color: #fff; }

.header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 90px;
}

.nav-left ul, .nav-right ul {
    display: flex;
    gap: 55px;
}

.nav-left ul li a, .nav-right ul li a {
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
}

.logo-center { text-align: center; min-width: 200px; }
.logo-center img { width: 300px; margin: 0 auto 5px; }

.company-name { display: block; font-size: 16px; font-weight: bold; line-height: 1.2; }
.company-en { display: block; font-size: 10px; color: #666; }

/* =================================================
   3. ヒーローセクション（2カラム・幅広ボタン）
   ================================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* 左側：コンテンツエリア */
.hero-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* コンテナ全体を中央に寄せる */
    padding-right: 40px;
}

.hero-title img {
    max-width: 100%;
    height: auto;
    margin-top: 100px;
    margin-bottom: 100px;
}

/* ボタンと電話番号のグループ */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start; /* 内部は左揃えをキープ */
    width: 100%;
    max-width: 500px; /* 左側コンテンツ内でのボタン最大幅 */
    padding: 0px 30px;
}

/* メールボタン：幅いっぱい */
.btn-email {
    display: block;
    width: 100%;
    background-color: #a40000;
    color: #ffffff;
    padding: 18px 0;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
    box-sizing: border-box;
}

.btn-email:hover { background-color: #800000; }

/* 電話番号 */
.btn-tel {
    display: inline-block;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    padding-left: 5px;
    transition: opacity 0.3s;
}

.btn-tel:hover { opacity: 0.7; }

/* 右側：ビジュアルエリア */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-visual img {
    width: 100%;
    max-width: 500px;
}

/* 会社概要 */
/* ダイアログ（モーダル）全体の背景 */
.modal-title{
	display:flex;
	justify-content:center;
}
.modal {
    display: none; /* 最初は隠す */
    position: fixed;
    z-index: 9999; /* 一番手前に */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6); /* 背景を暗くする */
}

/* ダイアログの中身 */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 15px;
    width: 95%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
    animation: fadeIn 0.3s;
}

/* 閉じるボタン */
.close-button {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    cursor: pointer;
}

/* 会社概要のテーブル */
.company-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.company-table th, .company-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.company-table th { width: 30%; color: #a40000; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.open-company {
    display: block;
    width: 50%;
    background-color: #a40000;
    color: #ffffff;
    padding: 18px 0;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
    box-sizing: border-box;
    margin-top: 60px;
}

/* =================================================
   4. 各セクション（私たちについて・事業内容）
   ================================================= */
.about { padding: 80px 0; }
.about-flex { display: flex; align-items: center; gap: 40px; }
.about-content { flex: 1; }
.about-image { flex: 1; }

.services { padding: 80px 0; background-color: white; }
.service-grid {
    display: grid !important;
    /* 1列あたりの幅を均等に3分割 */
    grid-template-columns: repeat(3, 1fr) !important;
    /* 隙間を調整（80pxは広めなので、画面幅によっては2列に落ちるのを防ぐため調整） */
    gap: 40px 30px; 
    text-align: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* カードの中身 */
.service-card {
    width: 100%;
    min-width: 0; /* グリッド崩れ防止 */
}

.service-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: 0 auto;
}

.card-image img { transition: 0.3s; }
.service-card a:hover .card-image img { transform: translateY(-10px); }

.card-title { font-size: 25px; margin: 15px 0; font-weight: bold; }
.btn-detail {
    border: 1px solid #a40000;
    color: #a40000;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 16px;
}

/* =================================================
   5. お問い合わせ & フッター
   ================================================= */
.contact { padding: 80px 0; }
.contact-form { max-width: 700px; margin: 0 auto; }
/* お問い合わせセクション専用のスタイル */

/* 親コンテナ */
.container-mailtitle {
    text-align: center; /* 中身を中央寄せ */
    padding: 60px 20px;
    background-color: #fff; /* 必要に応じて背景色を指定 */
}

/* このコンテナの中にある h2 だけを対象にする */
.container-mailtitle .section-title {
    font-size: 40px; 
    font-weight: 900;
    margin-bottom: 10px;
    color: #000;
    text-align: center; /* 念のため明示 */
    border: none; /* 他の場所で枠線などを使っている場合の打ち消し */
}

/* このコンテナの中にある span (マーカー部分) */
.container-mailtitle .title-main {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.container-mailtitle .title-main::before {
    content: "";
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, #c5a044 0%, #dab551 50%, #b38b36 100%);
    z-index: -1;
}

/* このコンテナの中にある p (サブテキスト) */
.container-mailtitle .section-sub {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    margin-top: 20px;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.5;
}

/* contact Form7 */
/* フォーム全体の列を揃える最終兵器 */
.form-group {
    display: flex !important;
    padding: 20px 0 !important;
    border-bottom: 1px solid #eee !important;
    align-items: flex-start !important;
}

/* 左側の「氏名」などのエリアを250pxで鉄壁に固定 */
.form-label {
    flex: 0 0 250px !important;
    width: 250px !important;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
    display: flex;
    align-items: center;
}

/* 右側の入力エリア */
.form-input {
    flex: 1 !important;
}

/* 必須マークの余白 */
.required {
    background: #ff0000;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 10px;
    border-radius: 2px;
}

/* CF7の自動生成タグを完全に無視させる */
.wpcf7-form-control-wrap {
    display: block !important;
    width: 100% !important;
}

/* 1. 全ての入力欄の開始位置と見た目を統一 */
.form-input input, 
.form-input select, 
.form-input textarea {
    display: block !important;
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid #ddd !important;
    background: #f9f9f9 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* 2. エラー時の設定（ここをより詳しく書くことで優先順位を上げます） */
.form-input input.wpcf7-not-valid, 
.form-input select.wpcf7-not-valid, 
.form-input textarea.wpcf7-not-valid {
    border: 2px solid red !important; /* これで上の1px #dddに打ち勝ちます */
    background-color: #fffafa !important; /* ほんのり赤くするとより親切です */
}


/* 送信ボタン全体のコンテナを中央寄せにする */
.form-submit {
    text-align: center !important;
    padding-top: 40px !important;
    width: 100% !important;
}

/* ボタン自体のデザイン（ミチオレッド） */
.form-submit .btn-submit {
    background: #a40000 !important; /* ミチオレッド */
    color: #fff !important;
    border: none !important;
    padding: 18px 80px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: bold !important;
    transition: background 0.3s, transform 0.2s !important;
    display: inline-block !important; /* 中央寄せを効かせるため */
}

/* ホバー（マウスを乗せた時）の動き */
.form-submit .btn-submit:hover {
    background: #800000 !important;
    transform: translateY(-2px) !important;
}


/* 各入力欄のすぐ下に出るエラーメッセージ（「入力してください」）の調整 */
.wpcf7-not-valid-tip {
    color: #ff0000 !important; /* 赤文字 */
    font-size: 12px !important;
    font-weight: bold;
    margin-top: 5px !important;
    display: block !important;
}


/* 動的に生成される特定のエラーIDをすべて非表示にする */
[id^="wpcf7-f93-o1-ve-"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* フッター全体のスタイル */
.site-footer {
    background-color: #333333; /* 薄いグレー */
    padding: 25px 0 20px;
    color: #ffffff;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
}

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

/* 横並びのレイアウト設定 */
.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ロゴエリア */
.footer-logo img {
    max-width: 350px; /* 画像のサイズに合わせて調整 */
    height: auto;
}

/* 住所・TELエリア */
.footer-info {
    font-size: 20px;
    line-height: 1.8;
    font-weight: bold;
    margin-top: 30px;
    margin-right: 10px;
}

/* ナビゲーション */
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 15px;
}

.footer-nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 20px;
}

/* PAGE TOP (縦書き) */
.page-top a {
    writing-mode: vertical-rl;
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    position: relative;
}

/* PAGE TOPの矢印線 */
.page-top .arrow-icon {
    display: block;
    width: 1px;
    height: 60px;
    background-color: #ffffff;
    margin-top: 10px;
    position: relative;
}

/* 矢印の先端（L字） */
.page-top .arrow-icon::before {
  content: "";
  position: absolute;
  top: 0;          /* 縦線の先端に配置 */
  left: 0;
  width:6px;       /* 横方向の長さ */
  height: 15px;      /* 縦方向の長さ */
  /* border-top: 1px solid #ffffff; */
  border-right: 1px solid #ffffff;
  /* 45度回転させて「>」のような形にする */
  transform: rotate(-45deg); /* 画像に合わせるための回転角度（微調整が必要かも） */
  /* 回転の基準点を中心にする */
  transform-origin: center center;
}

/* コピーライト */
.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    /* border-top: 1px solid #ccc; */
    /* padding-top: 20px; */
}


/* PCでは非表示にする */
.mobile-header, .mobile-nav {
    display: none;
}

html {
    /* ページ内のアンカーリンク移動をすべてスムースにする */
    scroll-behavior: smooth;
}

/* ページトップボタンのホバー時などの演出（お好みで） */
.page-top-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s;
}
.page-top-link:hover {
    opacity: 0.7;
}

/* 900px以下のレスポンシブ設定 */
@media (max-width: 900px) {
    /* PC版の要素を隠す */
    .site-header, .nav-left, .nav-right, .header-inner ,.page-top{ 
        display: none !important; 
    }

    /* スマホ版ヘッダーを表示 */
    .mobile-header {
        display: block !important; /* 強制的に表示 */
        /* position: relative; */
        width: 100%;
        padding: 30px 0;
        background: none;
        text-align: center;
        z-index: 10;
    }

    /* ロゴのサイズ調整 */
    .logo-center-sp img {
        max-width: 180px;
        height: auto;
        display: inline-block;
    }

    /* ハンバーガーボタン：画面右上に完全固定 */
    .hamburger {
        display: block !important; /* 強制的に表示 */
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1100;
        background: transparent !important;
        border: none !important;
        outline: none !important;
        width: 40px;
        height: 30px;
        padding: 0;
        cursor: pointer;
    }

    /* 三本線の見た目 */
    .hamburger span {
        display: block;
        width: 35px;
        height: 2px;
        background-color: #000;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        transition: all 0.3s;
    }

    .hamburger span:nth-child(1) { top: 4px; }
    .hamburger span:nth-child(2) { top: 14px; }
    .hamburger span:nth-child(3) { top: 24px; }

    /* メニュー画面（右からスライド） */
    .mobile-nav {
        display: block !important;
        position: fixed;
        top: 0;
        right: -100%; /* 初期状態は画面外 */
        width: 50%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        z-index: 1050;
        transition: right 0.4s ease;
        padding-top: 80px;
    }

    /* 開いた時の位置 */
    .mobile-nav.is-active {
        right: 0;
    }

    /* ×印のアニメーション */
    .hamburger.is-active span:nth-child(1) { transform: translate(-50%, 10px) rotate(45deg); }
    .hamburger.is-active span:nth-child(2) { opacity: 0; }
    .hamburger.is-active span:nth-child(3) { transform: translate(-50%, -10px) rotate(-45deg); }

    /* メニュー内のリスト項目 */
    .mobile-nav ul { list-style: none; padding: 0; }
    .mobile-nav li { border-bottom: 1px solid #eee; }
    .mobile-nav a {
        display: block;
        padding: 20px;
        text-decoration: none;
        color: #333;
        font-weight: bold;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .site-header{ padding-top: 0;}
    .section-title { font-size: 28px; }
    .section-sub-en,.section-sub,
    .container-mailtitle .section-sub { font-size: 18px; }
/* 画面幅が768px以下（一般的なスマホ・タブレット）の場合 */

    .section-title,
    .title-main,
    .section-sub,
    .section-sub-en {
        text-align: center !important;
        display: block; /* 中央寄せを確実に効かせるため */
        margin-left: auto;
        margin-right: auto;
    }

    /* マーカー（span）は文字幅に合わせるため inline-block に戻す */
    .title-main {
        display: inline-block;
        font-size: 28px; /* スマホ用にサイズを少し小さく調整 */
    }

    .section-sub {
        font-size: 18px; /* スマホ用にサイズを調整 */
    }

    .hero { flex-direction: column-reverse; text-align: center; padding: 0px 20px; padding-bottom: 50px; }
    .hero-container { padding-right: 0; margin-top: 30px; }
    .hero-buttons {  max-width: 100%; }
    .hero-visual img { max-width: 80%; }

	.hero {
        display: flex !important;
        flex-direction: column !important; /* 縦並びに強制 */
        /* SafariのZ軸解釈を安定させるおまじない */
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }

    /* 上に表示したい画像エリア */
    .hero-visual {
        order: 1 !important; /* 表示順を1番（上）に固定 */
        position: relative;
        z-index: 1; /* 重なり順は下 */
        /* Z軸：Safari対策で奥（または基準）に置く */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        margin-bottom: 20px; /* テキストとの間の余白 */
    }

    /* 下に表示したいテキストエリア */
    .hero-container {
        order: 2 !important; /* 表示順を2番（下）に固定 */
        position: relative;
        z-index: 10; /* 重なり順は上（画像に被さるように） */
        /* Z軸：Safariに対して「物理的に手前にある」と認識させる */
        -webkit-transform: translateZ(10px);
        transform: translateZ(10px);
        margin-top: -30px; /* 必要に応じて画像に少し被せるための調整（お好みで） */
    }


    
    .hero-title img { margin-top: -15px; margin-bottom: 30px;　z-index:1000}


    .about{ padding: 0;}
    .about-flex { flex-direction: column; }
	
	.open-company{
	margin-left: auto !important;  /* 左側を自動調整 */
    margin-right: auto !important; /* 右側を自動調整 */
    clear: both;                  /* 周りの回り込みを解除 */
    margin: 0 auto;
	margin-top:30px;
	}
	
	.company-table td, .company-table th {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 13px;
	}
	
    .service-grid {
        /* ここを2列に指定 */
        grid-template-columns: repeat(2, 1fr) !important;
        /* スマホ用の隙間 */
        gap: 20px 15px !important;
    }

    .card-title {
        font-size: 16px !important; /* 2列だと文字が重なるのを防ぐ */
        margin: 10px 0;
    }

    .card-title { font-size: 20px; margin: 15px 0; font-weight: bold; }
    
    .contact{ padding: 0;}
    .container-mailtitle { padding: 0px;}
    .form-group { flex-direction: column !important; }
    .form-label { flex: 0 0 auto !important; width: 100% !important; margin-bottom: 10px; }
    .btn-submit { border-radius: 5px; margin-top: 20px; margin-bottom: 40px;}

    .footer-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
	.footer-logo img {
        max-width: 200px; /* スマホではさらに一回り小さくする設定 */
        margin: 0 auto;   /* 中央寄せにする場合 */
    }
	.footer-info, .footer-nav{
		font-size:15px;
	}
    .footer-info, .footer-nav, .page-top {
        margin-top: 30px;
    }
    .page-top a {
        writing-mode: horizontal-tb; /* スマホでは横書きに */
    }
    .page-top .arrow {
        display: none;
    }
}

/* お問い合わせ未入力エラー処理 */
/* アンカー（#）による勝手なジャンプを物理的に無効化する設定 */
.wpcf7 {
    scroll-margin-top: 100vh; /* ジャンプしようとしても1画面分下に余白を作る */
}

/* ページ全体でアンカーによる「瞬間移動」を禁止し、JSでの制御を優先させる */
html {
    scroll-behavior: auto !important;
}

