:root {
    --primary: #4A6FDC;
    --engsubmit: #eb8a0d;
    --secondary: #34D399;
    --accent: #6366F1;
    --dark: #1E293B;
    --light: #F8FAFC;
    --gray: #575a5d;
    --light-blue: #EFF6FF;
    --light-green: #ECFDF5;
    --light-purple: #F5F3FF;
    --deep-purple: #DCCFFF;
    --light-yellow: #FEF9C3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 2rem 0;
    text-align: center;
} */

/* Header and Navigation */
header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo a {
    text-decoration: none;
    color: white;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
}

.slogan {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    flex-wrap: wrap; /* メニュー項目を必要に応じて折り返す */
    justify-content: flex-end; /* 右寄せ */
    max-width: 800px; /* メニューの最大幅を設定 */
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    margin: 0 0.8rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-cta {
    margin-left: 0.5rem;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Add padding to body to account for fixed header */
body {
    padding-top: 70px;
}

/* Hero section adjustment */
.hero {
    margin-top: 0;
}
/* モバイル表示時のみ表示 */
@media (min-width: 1025px) {
    .desktop-hidden {
    display: none;
    }
}
/* モバイルスタイル */
@media (max-width: 1024px) {
.hamburger-menu {
    display: flex;
    z-index: 1001;
}
.mobile-hidden {
    display: none;
}
.nav-menu {
    position: fixed;
    flex-direction: column;
    /* 背景色を半透明に変更 */
    background: rgba(74, 110, 220, 0.405); /* 薄いプライマリーカラー */
    /* 背景をぼかす効果を追加 - Webkit対応 */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available; /* iOSでの高さ問題解決 */
    padding: 80px 0 1rem;
    z-index: 1000;
    /* 3D変換でハードウェアアクセラレーションを強制 */
    transform: translate3d(-100%, 0, 0);
    -webkit-transform: translate3d(-100%, 0, 0);
    transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
    /* シャドウを微調整 */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    flex-direction: column; /* 縦並びに */
    flex-wrap: nowrap; /* 折り返しを無効化 */
    justify-content: flex-start; /* 上からスタート */
    align-items: center; /* 中央揃え */
    /* ハードウェアアクセラレーションのための追加プロパティ */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

/* ぼかし効果をサポートしない古いブラウザ用の代替スタイル */
@supports not ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    .nav-menu {
        background: rgba(74, 110, 220, 0.9); /* より濃い背景色で代替 */
    }
}

/* アクティブ状態のメニュー表示を3D変換に対応 */
.nav-menu.active {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

.nav-menu li {
    margin: 1rem 0;
    width: 100%;
    text-align: center;
}

.nav-cta {
    margin: 0.5rem 0;
    width: 80%;
}

/* .btn-nav {
    display: inline-block;
    padding: 1rem 2.2rem;
    background-color: var(--accent);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem;
    border: none;
    cursor: pointer;
} */

.logo h1 {
    font-size: 1.5rem;
}

.slogan {
    display: none;
}
}

/* ハンバーガーメニューのアニメーション */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* hero セクションは元の背景色と文字色に戻す */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    background: url('/image/header_back_image.webp') center/cover;
    background-blend-mode: overlay;
    background-color: rgba(0, 0, 0, 0.253);
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.5rem;
    max-width: 700;
    margin-bottom: 2rem;
}

/* ヒーローセクションの改行なし・自動縮小テキスト */
.no-wrap-text {
    white-space: nowrap; /* 改行を防止 */
    overflow: hidden; /* はみ出し部分を隠す */
    text-overflow: ellipsis; /* はみ出した場合に省略記号を表示 */
    width: 100%; /* 最大幅を設定 */
    text-align: center; /* 中央揃え */  }

  /* 大きな画面でのサイズ設定 */
.hero h1.no-wrap-text {
    font-size: 2.5rem;
}

.hero p.no-wrap-text {
    font-size: 1.3rem;
}
.section-title h2.no-wrap-text {
    font-size: 2.3rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    background-color: var(--secondary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    /* background-color: var(--primary); */
    background-color: var(--engsubmit);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

section {
    padding: 5rem 0;
}

/* ヘッダー下のセクション調整用 */
section[id] {
    scroll-margin-top: 70px; /* ヘッダーの高さ+余白 */
    padding-top: 90px; /* 既存のパディングに加えて余白を追加 */
}

/* 特定のセクションには固有の色を適用 */
.why-choose-us {
    background-color: var(--light-blue);
}

.projects {
    background-color: var(--light);
}

.our-service {
    background-color: var(--light-blue);
}

.how-it-works {
    background-color: var(--dark);
    color: white;
}

.testimonials {
    background-color: var(--light-blue);
}

.testimonials.alt-bg {
    background-color: var(--light);
}

.faq {
    background-color: var(--light-blue);
}

.pricing {
    background-color: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* how-it-works セクションのタイトル色調整 */
.how-it-works .section-title h2 {
    color: white;
}

.how-it-works .section-title p {
    color: #ddd;
}

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

.feature-card {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

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

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.icon {
    width: 120px;
    height: 90px;
    margin: 0 auto 1rem auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.service-icon {
    width: 120px;
    height: 90px;
    margin: 0 auto 1rem auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* スピーディーな案件紹介 */
.icon-speed {
    background-image: url('/image/icon_speed.png');
    background-size: contain;
}

/* 専任アドバイザー */
.icon-advisor {
    background-image: url('/image/icon_advisor.png');
    background-size: contain;
}

/* 豊富な案件数 */
.icon-projects {
    background-image: url('/image/icon_projects.png');
    background-size: contain;
}

/* 丁寧なヒアリング */
.icon-hearing {
    background-image: url('/image/icon_hearing.png');
    background-size: contain;
}

/* 案件マッチング */
.icon-matching {
    background-image: url('/image/icon_matching.png');
    background-size: contain;
}

/* 参画サポート */
.icon-support {
    background-image: url('/image/icon_support.png');
    background-size: contain;
}

/* 参画後フォロー */
.icon-follow {
    background-image: url('/image/icon_follow.png');
    background-size: contain;
}

/* Service Section */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Projects Section */
.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-tag {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.project-card h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.project-detail {
    display: flex;
    margin-bottom: 0.8rem;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 0.8rem;
}

.detail-label {
    flex: 0 0 40%;
    font-weight: 600;
    color: var(--dark);
}

.detail-value {
    flex: 0 0 60%;
    color: var(--gray);
}

.project-description {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.5;
}

.projects-more {
    text-align: center;
    margin-top: 2rem;
}

.projects-more p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.submit-engineer {
    text-align: center;
    margin-top: 2rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
}

.timeline-number {
    flex: 0 0 50px;
    height: 50px;
    background-color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-right: 1.5rem;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

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

.testimonial-card {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-content {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    background-color: #e2e8f0;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active {
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: #f8fafc;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--dark);
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    transition: all 0.3s ease;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--gray);
    background-color: white;
    line-height: 1.6;
}

.pricing-card-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pricing-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    max-width: 500px;
    margin: 0 auto;
    background-color: white;
}

.pricing-card.highlight {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(74, 111, 220, 0.2);
    transform: scale(1.05);
}

.pricing-card h3 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-list {
    text-align: left;
    margin: 2rem 0;
}

.feature-list li {
    margin-bottom: 1rem;
    list-style: none;
    position: relative;
    padding-left: 2rem;
    font-size: 1.1rem;
}

.feature-list li:before {
    content: "✓";
    color: var(--secondary);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.cta {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.cta.secondary {
    background: linear-gradient(135deg, var(--dark), #364659);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.date-input {
    height: 50px;
    min-height: 50px;
    line-height: 50px;
    font-size: 16px; /* iOSでのズームを防止するため16px以上を指定 */
    width: 100%;
    padding: 0 1rem;
    appearance: none;
    -webkit-appearance: none;
}

/* input[type="date"] {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark);
} */

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.8;
}

/* iOS用のスタイリング（既存） */
input[type="date"].empty-date::-webkit-datetime-edit {
    color: transparent;
}

input[type="date"].empty-date::-webkit-datetime-edit-text { 
    color: transparent; 
}

input[type="date"].empty-date::before {
    content: attr(placeholder);
    color: #757575;
    position: absolute;
    left: 1rem;
}

/* Android用のスタイリング（追加） */
/* Androidでは日付入力がフォーカスされた時のスタイル */
input[type="date"]:focus {
    color: var(--dark);
}

/* 日付入力フィールドの共通スタイル */
input[type="date"] {
    position: relative;
}

/* テキストモードの日付入力フィールド用スタイル */
input.date-input[type="text"] {
    color: var(--dark);
}

.form-control {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    margin: 0 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
}
.company-info {
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: #ddd;
}

.company-info p {
    margin: 0.3rem 0;
}
.company-info a {
    color: #ddd;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.company-info a:hover {
    color: var(--secondary);
}
.social-icons {
    margin-bottom: 2rem;
}

.social-icons a {
    color: white;
    margin: 0 1rem;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }

    .hero h1.no-wrap-text {
        font-size: calc(14px + 2vw);
    }

    .hero p.no-wrap-text {
        font-size: calc(12px + 1vw);
    }

    .icon, .service-icon {
        width: 85px;
        height: 65px;
    }

    .section-title h2.no-wrap-text {
        font-size: calc(14px + 1.8vw);
    }
    .section-title h2 {
        font-size: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-links a {
        margin: 0.5rem 0;
    }
    
    .pricing-card {
        padding: 1.5rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }

    .date-input {
        padding: 12px 15px;
        height: 50px;
    }

}

#engineer-form-message,
#client-form-message {
    margin-top: 1rem;
    display: none;
}

.success-message {
    background-color: var(--secondary);
    color: white;
    padding: 0.8rem;
    border-radius: 5px;
    text-align: center;
}

.error-message {
    background-color: #ef4444;
    color: white;
    padding: 0.8rem;
    border-radius: 5px;
    text-align: center;
}

.sending-message {
    background-color: var(--primary);
    color: white;
    padding: 0.8rem;
    border-radius: 5px;
    text-align: center;
}

フォーム入力欄のバリデーション
.form-control:invalid {
    border-color: #ef4444;
}

/* フォーム送信時の無効化 */
.form-disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 必須項目 */
.form-control[required] {
    border-left: 3px solid var(--primary);
}