/*
Theme Name: Kurashi Technica
*/


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;

}

a {
    text-decoration: none;
    color: inherit;
}

html,body{
    overflow-x:hidden;
}

/* ヘッダー */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 2rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

:root {
    --header-h: 88px;
}

header.hidden {
    opacity: 0;
    transform: translateY(-100%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
}

.header-ribbon {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.5rem;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);

    /* 2行表示でも“今のサイズ感”を崩さない */
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    white-space: normal; /* 全体は折り返し許可 */
    text-align: center;
}

.header-ribbon-main {
    font-weight: 900;
    white-space: nowrap; /* 1行目は崩さない */
}

.header-ribbon-sub {
    margin-top: 0.15rem;
    font-size: 0.82em;   /* 2行目は少し小さく */
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap; /* 2行目も崩さない */
}

.header-buttons {
    display: flex;
    gap: 0.75rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #2563eb;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.header-nav {
    display: flex;
    gap: 0.75rem;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    background: none;
}

.mobile-only {
    display: none;
}

.btn-header {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-phone {
    color: #374151;
    background-color: transparent;
}

.btn-phone:hover {
    background-color: #f3f4f6;
}

.btn-phone-number {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.btn-estimate {
    background-color: #f97316;
    color: white;
}

.btn-estimate:hover {
    background-color: #ea580c;
}

.btn-line {
    background-color: #22c55e;
    color: white;
}

.btn-line:hover {
    background-color: #16a34a;
}

/* セクション共通 */
.page-title {
    color: black;
    text-align: center;
    padding: 8rem 2rem 4rem;
    margin-top: 60px;
}

section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 4rem;
}

h2 {
    font-size: 3.25rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    color: #111827;
}

.section-subtitle {
    text-align: center;
    color: #4b5563;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ① ファーストビュー（画像のみ・pictureで切替） */
.fv {
    padding: 0;
    margin-top: var(--header-h); /* 固定ヘッダー分（ヘッダー高さに追従） */
    width: 100%;
    overflow: hidden;
}

.fv-picture {
    display: block;
    width: 100%;
}

.fv-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* =========================
   問題提起（画像・レスポンシブ切替）
========================= */
.problem-visual {
    padding: 0 !important; /* section共通paddingを上書き */
    margin: 0;
    width: 100%;
    overflow: hidden;
}

.problem-picture {
    display: block;
    width: 100%;
}

.problem-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}


/* ② 悩み・課題の提示 */
.worries {
    position: relative;
    background-image: url('./img/solution_bg_pc.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 背景画像の上に白オーバーレイ */
.worries::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

/* 中身を前面に出す */
.worries .container {
    position: relative;
    z-index: 1;
}

.worries-title { font-weight: 900; letter-spacing: .03em; margin: 0 0 1rem; line-height: 1.8; }
.worries-title-line { display: inline; }

.worries-title-em{
    color:#f97316; position:relative; display:inline-block; padding:0 .06em;
}
.worries-title-em::after{
    content:''; position:absolute; left:-.04em; right:-.04em; bottom:.08em;
    height:.42em; background:#ffe66d; z-index:-1; border-radius:.1em;
}



.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 100%;
}

.card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.card-image-wrapper {
    width: 100%;
    height: 200px;
    background-color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
    flex-shrink: 0;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.card-description {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
}


/* ④ 選ばれる理由 */
.reasons {
    background-color: white;
}
/* 選ばれる理由 見出し強調 */
.reasons-title {
  line-height: 1.3;
}

.reasons-em {
  color: #f97316;
  font-weight: 900;
  display: inline-block;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top:3rem;
}

.reason-card {
    background: linear-gradient(135deg, #fef3e2 0%, #fef9f3 100%);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.reason-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.reason-number {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    background-color: #d32f2f;
    border-radius: 0 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}

.reason-icon-wrapper {
    width: 150px;
    height: 150px;
    background-color: rgba(255, 182, 193, 0.4);
    border-radius: 50%;
    margin: 1.5rem auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.reason-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.reason-card h3 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.5rem;
}

.reason-card .reason-highlight {
    font-size: 1.8rem;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 1rem;
}

.reason-card p {
    color: #4b5563;
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ⑤ 実績・事例紹介 */
.cases {
    background-color: #f9fafb;
}

.case-item {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 4rem;
}

.case-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
}

.case-left h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.case-left p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.case-image {
    width: 100%;
     /* 比率ベース */
    aspect-ratio: 16 / 9;
    border-radius: 0.5rem;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.case-right {
    background-color: #eff6ff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.before-after-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.before-title {
    color: #2563eb;
}

.after-title {
    color: #22c55e;
    margin-top: 1.5rem;
}

/* =========================
   実績・事例：工事費用／価格比較
========================= */
.case-pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0 8px;
}

/* 工事内容リボン */
.price-ribbon {
    position: absolute;
    top: 12px;
    left: 100px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.04em;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35);
    z-index: 2;
    /* iOS Safariでの過剰拡大・はみ出し対策 */
    font-size: clamp(0.75rem, 3.2vw, 0.9rem);
    line-height: 1.2;
    padding: clamp(6px, 2vw, 8px) clamp(10px, 3vw, 14px);
    max-width: calc(100% - 120px);
    white-space: normal;
    word-break: keep-all;
}

/* 工事費用（price-card）は薄い青 */
.case-pricing .price-card {
    position: relative;
    background: #d7e5f8;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 14px 14px;
    box-shadow: 0 2px 10px rgba(0,0,3,0.4);
}

/* 価格比較（compare-card）は白のまま */
.case-pricing .compare-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.price-card-label {
    margin: 0 0 8px;
    font-weight: 800;
    font-size: 1.2rem;
    color: #000000 
}

.price-card-amount {
    margin: 0 0 10px;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: 0.01em;
    color: #000000
}

.price-card-amount .yen {
    font-size: 0.95rem;
    margin-right: 2px;
}

.price-card-amount .tax {
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 6px;
    color: #6b7280;
}

.price-card-notes {
    margin: 0;
    padding-left: 1.1em;
    color: #0a0a0b;
    font-size: 0.92rem;
}

.compare-rows {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.compare-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
    border-radius: 10px;
    background: #f9fafb;
    gap: 10px;
    min-width: 0;
}

.compare-row-em {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.compare-name {
    font-weight: 800;
    color: #111827;
    white-space: nowrap;      /* 2行割れ防止 */
    overflow: hidden;
    text-overflow: ellipsis;  /* 狭い場合は省略 */
    min-width: 0;
}

.compare-price {
    font-weight: 900;
    color: #111827;
    white-space: nowrap;
}

.compare-caption {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* ⑥〜⑥.5 共通背景（ご利用の流れ + 取扱製品） */
.flow-products-bg {
    position: relative;
    background-image: url('./img/solution_bg_pc.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.flow-products-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1); /* 透明度は好みで */
    z-index: 0;
}

.flow-products-bg > section {
    position: relative;
    z-index: 1;
}

/* ⑥ ご利用の流れ */

.flow-image {
    width: 100%;
    height: 16rem;
    background-color: #d1d5db;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.flow-item {
    position: relative;
    text-align: center;
}

.flow-number {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.flow-item-image {
    width: 100%;
    height: 10rem;
    background-color: #d1d5db;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 1rem;
}

.flow-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flow-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.flow-arrow {
    position: absolute;
    top: 2rem;
    right: -1rem;
    font-size: 1.5rem;
    color: #93c5fd;
}

.flow-item:last-child .flow-arrow {
    display: none;
}


/* 5 取扱製品（カード一覧） */

.products-title {
    text-align: left;
    font-size: 2.4rem;
    font-weight: 900;
    color: #d32f2f;
    margin: 0 0 2rem;
}

.products-title::after {
    content: '';
    display: block;
    width: 10rem;
    height: 4px;
    background: #d32f2f;
    margin-top: 12px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1.25rem 1.1rem 1.1rem;
    box-shadow: 0 10px 22px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-brand {
    font-size: 2rem;
    font-weight: 900;
    color: #ef4444;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.product-image-wrap {
    width: 100%;
    height: 180px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-meta {
    width: 100%;
    font-size: 1.05rem;
    color: #111827;
    margin-bottom: 0.85rem;
}

.product-meta-row {
    margin: 0.25rem 0;
}

.product-meta-label {
    font-weight: 900;
    color: #b45309;
    background: #fff3e0; /* 薄オレンジ */
    border: 1px solid #fdba74;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    display: block;
    width: fit-content;
    margin: 0 auto; /* ←これで全体中央 */
    letter-spacing: 0.02em;
}

.product-cta {
    width: 100%;
    text-align: center;
    background: #ef4444;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.9rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.7rem;
}

.product-cta:hover {
    filter: brightness(0.95);
}

.product-price {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.25rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-weight: 900;
    color: #ef4444;
    line-height: 1;
}

.product-price-main {
    font-size: 2rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.product-price-yen {
    font-size: 1rem;
    margin-left: 0.2rem;
    white-space: nowrap;
}

/* ⑦ お客様の声 */
.testimonials {
    background-color: #f9fafb;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.testimonial-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.testimonial-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    overflow: hidden;
    background-color: #d1d5db;
    flex-shrink: 0;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.testimonial-info h4 {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.testimonial-info p {
    font-size: 0.85rem;
    color: #4b5563;
}

.testimonial-text {
    color: #4b5563;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.stars {
    color: #fbbf24;
    font-size: 1.1rem;
}

/* ⑧ よくある質問 */
.faq {
    background-color: white;
}

.faq-container {
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer {
    color: #4b5563;
    line-height: 1.8;
    margin-left: 1.5rem;
    display: none;
    margin-top: 1rem;
}

.faq-answer::before {
    content: 'A ';
    color: #2563eb;
    font-weight: 600;
    margin-right: 0.5rem;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.faq-q-mark {
    color: #2563eb;
    font-size: 1.3rem;
}

.faq-text {
  flex: 1;
}

.faq-toggle {
  font-size: 1.6rem;
  font-weight: 900;
  color: #2563eb;
  transition: transform 0.25s ease;
}

/* ＋ */
.faq-toggle::before {
  content: "＋";
}

/* 開いたら − に */
.faq-item.active .faq-toggle::before {
  content: "−";
}

/* ⑨ 会社情報 */
.company {
    background: linear-gradient(135deg, #f3f4f6 0%, #f0fdf4 100%);
}

.company-page .company {
    padding-top: calc(var(--header-h) + 3rem);
    position: relative;
    background-image: url('./img/solution_bg_pc.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 固定ヘッダーに見出しが隠れない（ページ内リンク/スクロール対策も兼ねる） */
.company-page .company-title{
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.company-container {
    max-width: 1000px;
    margin: 0 auto;
}

.company-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.company-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.company-item {
    display: flex;
    flex-direction: column;
}

.company-label {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.company-value {
    font-size: 1.1rem;
    color: #111827;
    font-weight: 600;
}

.company-divider {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

/* 会社情報：反社会的勢力 排除宣誓 */
.company-policy {
  margin-top: 2.25rem;
  margin-bottom: 2.25rem; /* 会社カードとの隙間 */
  padding-bottom: 1.25rem; /* 境界を明確に */
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
}

.company-policy-title {
    color: #d32f2f;
    font-weight: 800;
    font-size: 1.7rem;
    margin: 0 0 0.75rem;
}

.company-policy-text {
    color: #4b5563;
    line-height: 1.9;
    margin: 0 0 0.75rem;
}

.company-policy-text:last-child {
    margin-bottom: 0;
}

/* 会社情報：Googleマップ */
.company-map {
    margin-top: 1.5rem;
}

.company-map-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    text-align: left;
}

.map-embed {
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    background: #e5e7eb;
    aspect-ratio: 16 / 9;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}


.philosophy-label {
    font-size: 1.3rem;
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.philosophy-text {
    color: #4b5563;
    line-height: 1.8;
}

/* ⑩ クロージング */
.closing {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    color: white;
    text-align: center;
}

.closing-container {
    max-width: 1000px;
    margin: 0 auto;
}

.closing h2 {
    color: white;
    margin-bottom: 1rem;
}

.closing-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.0rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 640px) {
    .closing-buttons {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.btn-closing {
    padding: 1.1rem 2.8rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 220px;
    text-align: center;
}

.btn-closing-white {
    background-color: white;
    color: #2563eb;
}

.btn-closing-white:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-closing-green {
    background-color: #22c55e;
    color: white;
}

.btn-closing-green:hover {
    background-color: #16a34a;
}

.btn-closing-orange {
    background-color: #f97316;
    color: white;
}

.btn-closing-orange:hover {
    background-color: #ea580c;
}

/* プライバシーポリシー */
.privacy {
    padding: 8rem 1rem 5rem;
    background: #ffffff; /* カード感を消す */
    }

.privacy-page .privacy{
    position: relative;
    background-image: url('./img/solution_bg_pc.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


.privacy-container {
    max-width: 980px;
    margin: 0 auto;
    background: transparent;
    padding: 2rem 1.25rem;
}

.privacy-title {
    font-size: 2.3rem;
    font-weight: 800;
    margin: 0 0 2rem;
    text-align: left;
    line-height: 1.9;
}

.privacy-brand {
    color: #d32f2f; /* 画像の赤 */
    font-weight: 900;
    margin-right: 0.25rem;
}

.privacy-title-rest {
    color: #4b5563;
    font-weight: 600;
    font-size: 1rem;
}

.privacy-container p,
.privacy-container li {
    color: #4b5563;
    line-height: 1.9;
    font-size: 1rem;
}

.privacy-container ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0 0.75rem;
}

.privacy-container li {
    margin: 0.35rem 0;
}

.privacy-contact {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.privacy-contact-name {
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.25rem;
}

.privacy-contact-tel {
    margin: 0;
    font-weight: 700;
}

.privacy-contact-tel a {
    text-decoration: underline;
}

/* プライバシー見出し：モバイルのみ改行 */
.privacy-mobile-break {
    display: inline;
}

.privacy-lead {
    margin: 0 0 1.75rem;
}

.privacy-section-title {
    color: #d32f2f;
    font-size: 1.6rem;
    font-weight: 900;
    margin-top: 2.4rem;
    margin-bottom: 0.75rem;
}

/* お問い合わせページ */
.contact {
    padding: 8rem 1rem 5rem; /* 固定ヘッダー分 */
    background: #ffffff;
}

.contact-page .contact{
    position: relative;
    background-image: url('./img/solution_bg_pc.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-container {
    max-width: 760px;
    margin: 0 auto;
}

.contact-card {
    background: #f6edcf;   /* 画像のベージュ */
    border-radius: 22px;
    padding: 2.2rem 1.6rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    box-sizing: border-box;
    overflow: hidden; /* はみ出し防止 */
}

.contact-title {
    text-align: center;
    font-size: 1.7rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1.3rem;
}
/* 見積もりフォーム */
.estimate-form-row { align-items: start; }

.estimate-required { color:#ef4444; font-weight:900; }

.estimate-panel{
  background:#fff;
  border:1px solid rgba(17,24,39,.10);
  border-radius:14px;
  padding:.9rem;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
}

.estimate-line{
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.85rem 0.85rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
}

.estimate-line + .estimate-line{ margin-top:.65rem; }

.estimate-rank{
    align-self: start;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.18);
    color: #1f2937;
    font-weight: 900;
    font-size: 0.88rem;
    line-height: 1;
}

.estimate-controls{
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 0.6rem;
    align-items: center;
}


.estimate-panel input[type="date"],
.estimate-panel select{
    width: 100%;
  max-width: 100%;
  min-width: 0; /* grid内でのはみ出し防止（iOS Safari対策） */
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font-size: 1rem; /* iOSでのフォーム拡大防止 */
  outline: none;
}

/* iOS/Safari: date input の見た目が暴れるのを抑える */
.estimate-panel input[type="date"]{
  -webkit-appearance: none;
  appearance: none;
}

.estimate-panel input[type="date"]:focus,
.estimate-panel select:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 160px 1fr; /* 左ラベル / 右入力 */
    align-items: center;
    gap: 0.9rem;
}

.form-row label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    text-align: left;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    font-size: 0.95rem;
    outline: none;
}

.form-row textarea {
    resize: vertical;
    min-height: 160px;
    padding: 0.6rem;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.form-row-textarea {
    align-items: start;
}

.form-actions {
    margin-top: 0.8rem;
    
    /* .form-row と同じ2カラムグリッドにして、ボタンを右カラムに揃える */
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    width: 100%;
    padding: 0 ; /* スマホではみ出し防止 */
    box-sizing: border-box;
}

.form-actions > p {
    grid-column: 2;
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
}

.contact-submit {
    font-size: 1.0rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.55rem 1.7rem;
    font-weight: 800;
    cursor: pointer;
    width: min(100%, 420px);   /* PC中央サイズ */
    display: block;
    margin: 0 auto;     /* 中央寄せ */
    box-sizing: border-box;
}

/* CF7が<p>で包まない場合（inputが直下に来る場合） */
.form-actions > input.wpcf7-submit,
.form-actions > input.contact-submit {
    grid-column: 2;
    justify-self: center;
}


/* CF7互換：フォームコントロールは span.wpcf7-form-control-wrap に包まれるため、
   gridの右カラムが崩れないように span をブロック化して幅100%にする */
.form-row .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* さらに強制（プラグイン側の !important を上書きするため特異性を上げる） */
.contact .contact-card .wpcf7 .wpcf7-form-control-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.contact .contact-card .wpcf7 .wpcf7-form-control-wrap input:not([type="checkbox"]):not([type="radio"]),
.contact .contact-card .wpcf7 .wpcf7-form-control-wrap textarea,
.contact .contact-card .wpcf7 .wpcf7-form-control-wrap select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* CF7互換：実体の入力要素にも既存スタイルが当たるようにする */
.form-row .wpcf7-form-control {
    width: 100%;
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}

.form-row .wpcf7-form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* テキストエリアは既存の高さ/余白に合わせる */
.form-row textarea.wpcf7-form-control {
    resize: vertical;
    min-height: 160px;
    padding: 0.6rem;
}


.contact-submit:hover {
    filter: brightness(0.95);
}


/* フッター */
footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copy {
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .price-ribbon {
        left: 95px;
        top: 15px;
        max-width: calc(100% - 80px);
    }

    h2 {
        font-size: 1.8rem;
    }

    :root {
        --header-h: 72px;
    }

    .fv-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    }



    /* ===== モバイル用ヘッダー最適化 ===== */
    header {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .header-ribbon {
            display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.45rem 0.7rem;
        font-size: 0.78rem;
        border-radius: 0.45rem;
        letter-spacing: 0.02em;
        text-align: center;
        white-space: normal;
        line-height: 1.1;
    }

    .header-ribbon-sub {
        margin-top: 0.12rem;
        font-size: 0.82em;
        letter-spacing: 0.01em;
    }


    /* リボンが横幅を圧迫しないように */
    .logo-wrapper {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .header-buttons {
        display: none; /* ボタンはCTAで対応 */
    }

    .hamburger {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: var(--header-h);
        right: 0;
        width: 80vw;
        height: calc(100vh - var(--header-h));
        background-color: #ffffff;
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 0.5rem;
        display: none;
        box-shadow: -4px 0 10px rgba(0,0,0,0.15);
        z-index: 999;
    }

    .header-nav.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        font-size: 1.05rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .mobile-only {
        display: block;
    }

    .reasons-em {
    display: block;
    margin-top: 0.3rem;
    }

    .worries {
    background-image: url('./img/solution_bg_tab.jpeg');
    }

    .worries-title{ font-size:2rem; line-height:1.7; text-align:center; }
    .worries-title-line{ display:inline; }

    .worries-grid,
    .solution-grid,
    .case-content {
        grid-template-columns: 1fr;
    }

    .case-image {
        aspect-ratio: 4 / 3;
    }

    /* 実績・事例紹介：モバイルでは画像の見切れ防止（トリミングしない） */
    .case-image {
        background: #ffffff;
    }

    .case-image img {
        object-fit: contain;
        object-position: center;
        background: #ffffff;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .card-image-wrapper {
        height: 150px;
    }

    .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flow-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flow-arrow {
        right: auto;
        bottom: -1rem;
        top: auto;
        transform: rotate(90deg);
    }

    .company-grid {
        grid-template-columns: 1fr;
    }

    .closing-buttons {
        flex-direction: column;
    }
    .problem-visual {
        padding: 0 !important;
    }

    section {
        padding: 3rem 1rem;
    }


    .case-pricing {
        grid-template-columns: 1fr;
    }

    .price-card-amount {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
  .fv-image {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  :root {
    --header-h: 72px;
  }

  .worries {
    background-image: url('./img/solution_bg_sp.jpeg');
  }

  .privacy-mobile-break {
    display: block;
  }

  .worries-title{ font-size:1.55rem; line-height:1; text-align:center; }
  .worries-title-line{ display:block; }
  .worries-title-line1{ margin-bottom:.35rem; }

  .problem-visual {
    padding: 0 !important;
  }

  .contact-card {
    padding: 1.8rem 1.2rem;
    border-radius: 18px;
  }

.form-actions {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 0;
  }

  .form-actions > p {
    grid-column: 1;
    width: 100%;
  }


    .contact .contact-card input.contact-submit {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    margin: 0 auto;
  }

  /* submitが<p>で包まれない場合も含めて、必ず横幅いっぱい＆中央に */
    .form-actions > input.wpcf7-submit,
    .form-actions > input.contact-submit {
        grid-column: 1;
        justify-self: stretch;
        width: 100% !important;
        max-width: 100% !important;
    }
  .products-title {
    font-size: 1.8rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .form-row {
    grid-template-columns: 1fr; /* スマホは縦並び */
    gap: 0.4rem;
  }
  .case-image {
    aspect-ratio: 1 / 1;
  }
  /* さらに小さい画面では高さバランスを調整 */
  .case-image {
    aspect-ratio: 4 / 3; /* 1/1 だと余白が増えやすいので戻す */
  }

      /* 見積もり希望日：スマホは縦積みで見やすく */
  .estimate-line{
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.95rem 0.9rem;
  }

     .estimate-controls{
    grid-template-columns: 1fr;
  }

    .estimate-panel input[type="date"],
    .estimate-panel select{
        min-height: 48px;
      font-size: 16px; /* iPhoneでズームしない */
  }

    .compare-row{
    padding: 12px 12px;
  }

    .product-price-main { font-size: 1.75rem; }
    .product-price-yen { font-size: 0.95rem; }
}