/* 基本設定 */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f6f6f6;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px; /* 左右のパディング */
    box-sizing: border-box;
}

.section-padded {
    padding: 50px 0;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 40px;
    color: #555;
}

/* 「粘り強く」「とことん」「最後まで」の強調 (赤文字) */
.section-subtitle-red {
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: #333; /* デフォルトは黒 */
    line-height: 1.4;
    letter-spacing: 0.05em;
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.section-subtitle-red .text-red {
    color: red; /* 明示的に赤文字にする */
}

/* テキスト強調色 */
.text-red {
    color: red;
}
.marker-yellow {
    background-color: #FBC02D;
    padding: 2px 5px;
    border-radius: 3px;
}

/* H2タグのスタイル (グレー基調) */
.section-title-gray {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    color: #333; /* 文字色を黒に */
    background-color: #e0e0e0; /* グレー基調の背景色 */
    padding: 15px 20px;
    margin-top: 0;
    margin-bottom: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px; /* 横幅を統一 */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.section-title-gray .section-icon {
    margin-right: 15px;
    font-size: 1.1em;
    color: #ef8700; /* アイコン色をアクセントに */
}
/* 【あなただけのミカタ】などのH2 */
.section-title-gray.wide-text-h2 { /* クラス名を変更 */
    background-color: transparent; /* 背景色なし */
    color: #333; /* 文字色 */
    box-shadow: none; /* 影なし */
    font-size: 1.8em; /* 文字サイズ調整 */
    padding: 0; /* パディングなし */
    margin-bottom: 20px;
    display: block; /* ブロック要素に */
    text-align: center; /* 中央寄せを維持 */
    line-height: 1.4; /* 行間調整 */
    max-width: 960px; /* 幅を広げる */
}
.section-title-gray.wide-text-h2 .section-icon {
    display: block; /* アイコンを独立して配置 */
    margin: 0 auto 10px auto; /* アイコン中央寄せ */
    font-size: 1.5em; /* アイコンサイズ調整 */
    color: #ef8700;
}


/* ヘッダー部 */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 5px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    min-height: 50px;
}
.header-content .logo-area { /* ロゴエリアをFlexコンテナに */
    display: flex;
    align-items: center;
    gap: 15px; /* ロゴとタグラインの間のスペース */
}
.header-content .logo-area img { /* ロゴ画像を左に */
    order: -1; /* Flexアイテムの順序を一番最初に */
}
.header-content .logo-area p {
    font-size: 0.9em;
    margin: 0; /* マージンをリセット */
    line-height: 1.4;
    color: #555;
    white-space: nowrap;
}
.header-content .contact-button a {
    background-color: #ef8700;
    color: white;
    padding: 12px 25px; /* 大きさ200%に調整 (元の8px 18pxから) */
    font-size: 1.2em; /* 文字サイズも調整 */
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.3s;
}
.header-content .contact-button a:hover {
    background-color: #d87600;
}
.header-content .contact-button a i {
    margin-left: 8px;
}

/* ナビゲーションメニュー */
.main-nav {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 10px 0;
    position: sticky;
    top: 60px; /* ヘッダーの高さに合わせて調整 */
    z-index: 999;
}
.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: space-around;
}
.main-nav li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}
.main-nav li a:hover {
    color: #ef8700;
}
.main-nav li a i {
    margin-right: 8px;
}

/* メインビジュアル */
.hero-section img {
    width: 100%;
    height: auto;
    display: block;
}

/* サービス紹介セクション */
.service-intro-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    align-items: stretch; /* 高さ揃え */
}
.service-item {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 300px;
    max-width: 45%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
@media (max-width: 767px) {
    .service-item {
        max-width: 90%;
    }
}
.service-item-title {
    color: white;
    background-color: #ef8700;
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap; /* 各種試作作製サポートとものづくりサポートを一行に */
}
.service-item ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0;
}

/* コンテンツと画像の横並び (サービスCTAブロック) */
.service-cta-block {
    margin-top: 50px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center; /* 中央に揃えて高さを合わせる */
    gap: 30px;
}
.service-cta-block .image-half {
    flex: 1 1 40%; /* 画像の幅を調整 */
    max-width: 40%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 0; /* 画像とテキストの間に余白はギャップで */
}
.service-cta-block .text-half {
    flex: 1 1 55%; /* テキストの幅を調整 */
    max-width: 55%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 0; /* テキストと画像の間に余白はギャップで */
}
.service-cta-block img {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 100%;
    height: auto;
}
.service-cta-block .text-half p.no-break-paragraph { /* 新しいクラス名 */
    margin: 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: auto; /* 最低限の高さ指定を解除 */
    display: block; /* Flexを解除して自動改行を許可 */
    line-height: 1.6;
    margin-bottom: 15px; /* 段落間の余白 */
    white-space: normal; /* 改行を許可 */
}
.service-cta-block .text-half p:last-of-type {
    margin-bottom: 0;
}


/* 試作フロー画像 */
.full-width-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 得意分野 */
.specialty-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); /* 3つのブロックと2つのX */
    gap: 0px; /* ギャップを0に設定 */
    align-items: stretch;
    justify-content: center;
}
.specialty-item {
    background-color: #fff;
    padding: 15px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    box-sizing: border-box;
    min-width: 180px; /* ブロックの最小幅を設定 */
}
.specialty-item img {
    border-radius: 8px;
    margin-top: 8px;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}
.specialty-text {
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: auto;
    word-break: break-word;
    white-space: normal;
    font-size: 1.4em; /* 文字を大きく */
}
.x-separator {
    background-color: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px; /* Xのパディングを最小限に */
    font-size: 2.5em; /* Xを大きく */
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}
.x-separator p {
    margin: 0;
    padding: 0;
    display: inline-block;
}
.ng-items {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: #fce4e4;
    border-radius: 8px;
    border: 1px solid red;
    color: #333;
}

/* 実績ギャラリー */
.gallery-grid-performance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.gallery-item-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.gallery-item-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}
.gallery-item-content {
    padding: 15px;
    flex-grow: 1;
    font-size: 0.95em;
    line-height: 1.6;
}
.gallery-item-content u {
    color: #ef8700;
}

/* 何でも”気軽”に相談できるブロック（テキストと画像の横並び） */
.image-text-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.image-text-block .text-content {
    flex: 1;
    min-width: 300px;
}
.image-text-block .image-content {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-text-block .image-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.block-heading {
    font-size: 2em;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.3;
}
.block-heading .text-red {
    color: red;
}

/* モノづくり悩みブロック */
.problem-statement {
    margin-top: 60px;
}
.problem-box {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 20px;
    line-height: 1.8;
}
.problem-box.large-text p { /* 文字を大きく */
    font-size: 1.15em;
    line-height: 2; /* 行間を調整 */
}

/* 例えばこんなことありませんか？ */
.example-problems {
    margin-top: 60px;
}
.problem-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}
.problem-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 280px;
    max-width: 30%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.problem-card-title {
    background-color: #ef8700;
    color: white;
    padding: 20px 15px;
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    flex-shrink: 0;
}
.problem-card-title .text-red {
    color: red;
}
.problem-card-text {
    padding: 20px;
    background-color: #fff;
    flex-grow: 1;
}

/* お客様の声 スライダー */
.customer-voice-section {
    margin-top: 60px;
    text-align: center;
}
.customer-voice-slider {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 50px;
    position: relative;
}
.customer-voice-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: auto;
    box-sizing: border-box;
}
.customer-voice-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #eee;
}
.customer-voice-card .case-number {
    font-size: 1.1em;
    font-weight: bold;
    background-color: #FBC02D;
    padding: 2px 5px;
    border-radius: 3px;
}
.customer-voice-card p {
    text-align: left;
    margin-top: 15px;
    flex-grow: 1;
}
.swiper-button-prev,
.swiper-button-next {
    color: #333 !important;
    background-color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    top: 50%;
    transform: translateY(-50%);
}
.swiper-button-prev {
    left: 10px;
}
.swiper-button-next {
    right: 10px;
}
.swiper-pagination-bullet-active {
    background-color: #ef8700 !important;
}

/* 匠紹介セクション */
.expert-intro-section {
    margin-top: 60px;
}
.expert-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    margin-bottom: 60px;
}
.expert-block:last-child {
    margin-bottom: 0;
}
.expert-block.reverse-layout {
    flex-direction: row-reverse; /* 画像とテキストの順序を反転 */
}
.expert-block .expert-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.expert-block .expert-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.expert-block .expert-text {
    flex: 2;
    min-width: 300px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQアコーディオン */
.accordion {
    max-width: 700px;
    margin: 0 auto;
}
.accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    overflow: hidden;
}
.accordion-header {
    padding: 18px 25px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s;
}
.accordion-header:hover {
    background-color: #f8f9fa;
}
.accordion-header .accordion-icon {
    margin-right: 15px;
    color: #ef8700;
}
.accordion-header .accordion-title-text {
    flex-grow: 1;
}
.accordion-toggle-icon {
    margin-left: 15px;
    transition: transform 0.3s;
}
.accordion-item.active .accordion-header {
    color: #ef8700;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    border-top: 1px solid #e9ecef;
    background-color: #fff;
}
.accordion-item.active .accordion-content {
    max-height: 600px;
    padding-top: 10px;
    padding-bottom: 25px;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}
.accordion-item.active .accordion-toggle-icon {
    transform: rotate(180deg);
}

/* フォーム */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
form table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}
form th, form td {
    border: 1px solid #eee;
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
}
form th {
    width: 30%;
    background-color: #f7f7f7;
    font-weight: normal;
    white-space: nowrap;
}
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea {
    width: calc(100% - 16px);
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}
form .required {
    color: red;
    margin-left: 5px;
    font-size: 0.9em;
}
.submit-button-wrapper {
    text-align: center;
    margin-top: 30px;
}
.inquiry-form-submit-button {
    background-color: #ef8700;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 22px;
    padding: 18px 36px;
    display: inline-block;
    width: fit-content;
    transition: background-color 0.3s;
}
.inquiry-form-submit-button:hover {
    background-color: #d87600;
}

/* フッター */
.site-footer {
    background-color: #ffffff;
    padding: 40px 0;
    border-top: 1px solid #eee;
}
.footer-content-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* 中央寄せ */
    align-items: flex-start;
    gap: 30px;
}
.footer-logo {
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 20px;
}
.footer-logo img {
    width: 160px;
    height: auto;
}
.company-info {
    flex: 1 1 auto;
    min-width: 300px;
    max-width: 500px;
    font-size: 0.9em;
    text-align: center;
}
.company-info table {
    width: auto;
    margin: 0 auto;
    border-collapse: collapse;
}
.company-info td {
    border: 1px solid #eee;
    padding: 8px 15px;
    text-align: left;
}
.company-info tr:nth-child(odd) {
    background-color: #f9f9f9;
}
.copyright {
    flex-basis: 100%;
    text-align: center; /* 中央寄せ */
    margin-top: 20px;
    font-size: 0.8em;
    color: #777;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header-content,
    .main-nav ul,
    .service-intro-grid,
    .content-with-image,
    .specialty-grid,
    .problem-cards-grid,
    .expert-block {
        flex-direction: column;
        align-items: center;
    }
    .header-content {
        align-items: center; /* ヘッダーの配置を調整 */
    }
    .header-content .logo-area,
    .header-content .contact-button {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    .header-content .contact-button {
        margin-bottom: 0;
    }
    .main-nav ul li {
        width: 100%;
        text-align: center;
    }
    .service-item,
    .specialty-item,
    .problem-card {
        max-width: 100%;
    }
    .customer-voice-slider {
        padding: 0 20px;
    }
    .swiper-button-prev,
    .swiper-button-next {
        display: none;
    }
    .section-title-gray {
        font-size: 1.8em;
    }
    .section-title-gray.wide-text-h2 {
        font-size: 1.5em;
        max-width: 100%; /* スマホでは幅を100%に */
    }
    .image-text-block {
        padding: 20px;
    }
    .service-cta-block .image-half,
    .service-cta-block .text-half {
        max-width: 100%; /* スマホでは100% */
        padding: 0;
    }
    .expert-block.reverse-layout {
        flex-direction: column;
    }
    .company-info {
        min-width: unset;
        width: 100%;
    }
    .footer-content-grid {
        justify-content: center;
        text-align: center;
    }
    .company-info table {
        width: 100%;
    }
    .company-info td {
        white-space: normal;
    }
    .specialty-grid { /* スマホでは得意分野も1列に */
        grid-template-columns: 1fr;
    }
    .x-separator { /* スマホではXを非表示に */
        display: none;
    }
}

@media (max-width: 480px) {
    .section-title-gray {
        font-size: 1.5em;
        padding: 10px 15px;
    }
    .section-title-gray.wide-text-h2 {
        font-size: 1.2em;
    }
    .inquiry-form-submit-button {
        font-size: 18px;
        padding: 15px 30px;
    }
    form th, form td {
        display: block;
        width: 100%;
    }
    form th {
        text-align: left;
    }
    form input[type="text"],
    form input[type="email"],
    form input[type="tel"],
    form textarea {
        width: 100%;
    }
}