/**
 * LeadEdge カスタムスタイル
 * STUDIOから移植したプロジェクト固有のスタイル
 */

/* カラーパレット定義 */
:root {
    --background: #2b2b2b;
    --foreground: #272343;
    --accent: #eb7318;
    --text-white: #fff;
    --text-gray: #6d688e;
    
    /* フォント変数 */
    --font-poppins: 'Poppins', sans-serif;
    --font-lato: 'Lato', sans-serif;
    --font-noto-sans-jp: 'Noto Sans JP', sans-serif;
}

/* Body設定 */
body {
    color: var(--foreground);
    font-family: var(--font-noto-sans-jp), sans-serif;
}

/* トップページのみダーク背景 */
body.home {
    background: var(--background);
}

/* お知らせ・アーカイブページはライトグレー背景 */
body.archive,
body.single-post,
body.page-template-page-news,
body.blog {
    background: #f9fafc;
}

/* その他のページは白背景 */
body:not(.home):not(.archive):not(.single-post):not(.page-template-page-news):not(.blog) {
    background: #ffffff;
}

/* 記事本文用のスタイル(.proseクラス) */
.prose {
    color: var(--foreground);
}

.prose p {
    margin-top: 1em;
    margin-bottom: 1em;
    line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: var(--foreground);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 700;
}

.prose h1 {
    font-size: 2em;
}

.prose h2 {
    font-size: 1.5em;
}

.prose h3 {
    font-size: 1.25em;
}

.prose ul,
.prose ol {
    margin-top: 1em;
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
}

.prose a:hover {
    opacity: 0.8;
}

.prose img {
    border-radius: 0.5rem;
    max-width: 100%;
    height: auto;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.prose blockquote {
    border-left: 4px solid var(--accent);
    color: var(--text-gray);
    margin-left: 0;
    margin-right: 0;
    padding-left: 1em;
    font-style: italic;
}

.prose code {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.25rem;
    padding: 0.2em 0.4em;
    font-size: 0.9em;
}

.prose pre {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    padding: 1em;
    overflow-x: auto;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

.prose table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.prose th,
.prose td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5em;
}

.prose th {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

.prose hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 2em;
    margin-bottom: 2em;
}

/* --- MW WP Form Layout Fix --- */

/* --- Contact Page Header Specific --- */

/* 1. 巨大なメインタイトル */
.contact-main-title {
    font-family: var(--font-poppins);
    font-size: clamp(48px, 10vw, 120px); /* 画面幅に合わせて動的にサイズ変更 */
    font-weight: 900;
    color: #272343;
    line-height: 0.9;
    letter-spacing: -0.04em; /* 文字間を詰めてモダンにする */
    margin-bottom: 2rem;
    text-transform: none;
}

/* 2. 日本語サブタイトル */
.contact-sub-title {
    font-family: var(--font-noto-sans-jp);
    font-size: 14px;
    color: #6d688e;
    line-height: 1.8;
    letter-spacing: 0.05em;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .contact-sub-title {
        font-size: 16px;
    }
}

/* 3. 背景色を元サイトと同じ薄いグレーに固定 */
body.page-template-page-contact {
    background-color: #f9fafc !important;
}

/* 4. パンくずのホバー効果 */
nav a {
    position: relative;
}


/* --- LeadEdge Contact Form: Precision Styling --- */

/* 1. フォーム全体を中央寄せ、Next.js版の幅に合わせる */
.contact-form-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
}

/* 2. 各行のレイアウト（PCで横並び、スマホで縦並び） */
.form-row {
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    border-bottom: 1px solid #f0f0f0;
}

@media (min-width: 768px) {
    .form-row {
        flex-direction: row;
        align-items: flex-start;
    }
}

.form-row.no-border { border-bottom: none; }

/* 3. ラベル部分 */
.form-label-area {
    width: 100%;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 768px) {
    .form-label-area { width: 280px; margin-bottom: 0; }
}

.label-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #272343;
}

.badge-required { background: #eb7318; color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 700; }
.badge-optional { background: #cbd5e0; color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 700; }

/* 4. 入力欄（MW WP Formのspanを無視してinputを100%に） */
.form-input-area { flex: 1; width: 100%; }
.mwform_text_wrapper, .mwform_email_wrapper, .mwform_textarea_wrapper { display: block; width: 100%; }

.input-field, .textarea-field {
    width: 100% !important;
    background-color: #f4f7f9 !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    font-size: 1rem !important;
    color: #272343 !important;
    transition: all 0.3s;
}

.input-field:focus, .textarea-field:focus {
    background-color: #fff !important;
    border-color: #eb7318 !important;
    box-shadow: 0 0 0 4px rgba(235, 115, 24, 0.1) !important;
    outline: none;
}

.textarea-field { height: 180px !important; }

/* 5. 送信ボタン（Next.js版のフローティング感を再現） */
.submit-area { text-align: center; padding-top: 3rem; }
.privacy-notice { font-size: 0.9rem; color: #6d688e; margin-bottom: 1.5rem; }
.privacy-notice a { text-decoration: underline; color: #272343; }

.submit-btn {
    width: 100%;
    max-width: 320px;
    height: 70px;
    background: #eb7318 !important;
    color: #fff !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(235, 115, 24, 0.2);
    transition: transform 0.2s, background 0.2s;
}

.submit-btn:hover {
    background: #272343 !important;
    transform: translateY(-2px);
}

/* 6. エラーメッセージ */
.error { color: #e53e3e; font-size: 0.8rem; margin-top: 8px; display: block; font-weight: 600; }

/* --- Contact Page: Pixel Perfect Recreation --- */

.contact-page-wrapper {
    padding-top: 140px;
    padding-bottom: 100px;
    background-color: #f9fafc; /* 元サイトの背景色 */
}

@media (min-width: 1024px) {
    .contact-page-wrapper { padding-top: 200px; }
}

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

@media (min-width: 768px) {
    .contact-container { padding: 0 60px; }
}

/* パンくず */
.contact-breadcrumbs {
    display: flex;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #6d688e;
    margin-bottom: 60px;
    text-transform: uppercase;
}

.contact-breadcrumbs .sep { color: #e2e8f0; }
.contact-breadcrumbs .current { color: #272343; }

/* メインタイトル: ここが心臓部です */
.contact-header {
    text-align: center;
    margin-bottom: 80px;
}

.contact-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 900 !important; /* 最も太く */
    font-size: 64px; /* Mobile */
    line-height: 0.85;
    letter-spacing: -0.05em; /* 文字を思い切り詰める */
    color: #272343;
    margin-bottom: 40px;
    text-transform: none;
}

@media (min-width: 768px) {
    .contact-title {
        font-size: 120px;
    }
}

@media (min-width: 1280px) {
    .contact-title {
        font-size: 160px; /* ここまで大きくして初めてNext.js版に並びます */
    }
}

/* サブテキスト */
.contact-description {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #6d688e;
    line-height: 2;
    max-width: 600px;
    margin: 0 auto;
}

/* フォームを囲む白背景のボックス（必要なら） */
.contact-form-body {
    max-width: 900px;
    margin: 0 auto;
}

/* --- Select Box Styling (LeadEdge Style) --- */

/* 1. セレクトボックスを囲む枠（矢印を配置するための親要素） */
.select-wrapper {
    position: relative;
    width: 100%;
}

/* 2. 独自の矢印アイコン（SVGまたは疑似要素） */
.select-wrapper::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: #272343; /* 矢印の色 */
    /* 下向きの三角形（矢印）を作成 */
    clip-path: polygon(100% 0%, 0 0%, 50% 100%);
    pointer-events: none; /* 矢印の上をクリックしてもセレクトが開くようにする */
}

/* 3. セレクトボックス本体 */
.c-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100% !important;
    background-color: #f4f7f9 !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    padding: 1.25rem 3rem 1.25rem 1.5rem !important; /* 右側に矢印用の余白を確保 */
    font-size: 1rem !important;
    color: #272343 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

/* 4. フォーカス時 */
.c-select:focus {
    background-color: #fff !important;
    border-color: #eb7318 !important;
    box-shadow: 0 0 0 4px rgba(235, 115, 24, 0.1) !important;
}

/* 5. 未選択（最初の項目）の色を少し薄くする場合（任意） */
.c-select option[value="選択してください"] {
    color: #6d688e;
}

.button-wrapper{
    margin-top: 20px;
}


/* --- Privacy Policy Content Styling --- */

.privacy-section {
    padding: 2.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.privacy-section.no-border { border-bottom: none; }

.privacy-h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #272343;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.privacy-p {
    font-size: 1rem;
    color: #6d688e;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.privacy-ul {
    list-style: none;
    padding-left: 0;
}

.privacy-ul li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 1rem;
    color: #6d688e;
    margin-bottom: 0.5rem;
}

.privacy-ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 6px;
    height: 6px;
    background-color: #eb7318;
    border-radius: 50%;
}

.back-link input[type=submit]{
    display: inline-block;
    padding: 20px 30px;
    border-radius: 999px;
    font-size: 15px;
    line-height: 1;

    margin-top: 20px;
    cursor: pointer;

    background-color: #e2e2e2;
}