/*
Theme Name: jjia Theme
Theme URI: https://jjia.jp/
Author: jjia
Description: 柔道整復師統合協会
Version: 1.0
*/

/* --- 全体設定 --- */
html {
    scroll-behavior: smooth;
}

/* --- ヘッダー --- */
.header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.header-inner {
    display: flex;
    justify-content: center;
}
.header-logo a {
    display: flex;
    align-items: center;
    color: #003366;
    font-size: 1.2rem;
    font-weight: bold;
}
.header-logo img {
    height: 40px;
    margin-right: 10px;
}

/* --- メインビジュアル --- */
.hero {
    /* WordPressテーマ構造に合わせてパスを assets/images/ に変更 */
    background: linear-gradient(rgba(0,51,102,0.8), rgba(0,51,102,0.6)), url('assets/images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-color: #003366;
    color: #fff;
    height: 600px;
    display: flex;
    align-items: center;
    text-align: center;
}
.hero-content {
    max-width: 800px;
}
.hero-title {
    font-size: 2.8rem;
    margin-bottom: 25px;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-text {
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 500;
    opacity: 0.9;
}
.hero-btn {
    min-width: 300px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .hero { height: 500px; }
    .hero-title { font-size: 1.8rem; }
    .hero-text { font-size: 1rem; text-align: left; }
}

/* --- 導入部（Concept） --- */
.intro-box {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.intro-title {
    font-size: 1.8rem;
    color: #003366;
    margin-bottom: 30px;
    line-height: 1.5;
}
.intro-text {
    text-align: justify;
    line-height: 2;
}

/* --- 事業紹介（Service） --- */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
}
.service-item {
    display: flex;
    align-items: center;
    gap: 50px;
    background: #fff;
}
.service-item-reverse {
    flex-direction: row-reverse;
}

.service-img {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.service-content {
    flex: 1;
}
.service-head {
    font-size: 1.5rem;
    color: #003366;
    margin-bottom: 20px;
    border-left: 5px solid #c9a063;
    padding-left: 15px;
}

@media (max-width: 768px) {
    .service-item, .service-item-reverse {
        flex-direction: column;
        gap: 20px;
    }
    .service-head { font-size: 1.3rem; }
}

/* --- お問い合わせ（Contact for CF7） --- */
.contact-lead {
    text-align: center;
    margin-bottom: 40px;
}

/* フォーム全体枠 */
.form-wrapper {
    background-color: #fff;
    padding: 50px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

/* 営業お断り通知エリア */
.form-notice {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    color: #666;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 0.9rem;
    border-radius: 4px;
}
.form-notice p {
    margin: 0;
    font-weight: bold;
}

/* フォームグループ（CF7用） */
.form-group {
    margin-bottom: 25px;
}

/* ラベル：CF7でも構造を維持するために label タグをターゲット */
/* 同意チェックのラベルは除外 */
.form-group label:not(.privacy-label) {
    display: flex;
    justify-content: space-between; /* 文字左、マーク右 */
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
    font-weight: bold;
    color: #003366;
}

/* 必須・任意ラベル */
.required, .optional {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 2px;
    white-space: nowrap;
    margin-left: 10px;
}
.required { background: #e74c3c; color: #fff; }
.optional { background: #999; color: #fff; }

/* 入力欄共通（CF7のクラスに対応） */
.form-wrapper input[type="text"],
.form-wrapper input[type="email"],
.form-wrapper input[type="tel"],
.form-wrapper select,
.form-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fafafa;
    appearance: none;
    box-sizing: border-box; /* CF7のはみ出し防止 */
}

/* フォーカス時 */
.form-wrapper input:focus,
.form-wrapper select:focus,
.form-wrapper textarea:focus {
    outline: none;
    border-color: #003366;
    background-color: #fff;
}

/* 個人情報保護方針のボックス */
.privacy-box {
    height: 150px;
    overflow-y: scroll;
    border: 1px solid #ccc;
    background-color: #fafafa;
    padding: 15px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
    border-radius: 4px;
    margin-bottom: 10px;
}
.privacy-box strong { color: #333; }
.privacy-box p { margin-bottom: 0.5em; }

/* 同意チェックボックス周り（CF7のspan対策） */
.privacy-check-wrapper {
    text-align: center;
    margin-top: 20px;
}
.privacy-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #333 !important;
    width: auto;
}
/* CF7が出力するspan要素のリセット */
.privacy-label .wpcf7-list-item {
    margin: 0;
    display: inline-block;
}
/* チェックボックス本体 */
.privacy-label input[type="checkbox"] {
    width: auto !important;
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

/* 送信ボタン（CF7は input type="submit"） */
.form-submit {
    margin-top: 40px;
    text-align: center;
}
.wpcf7-submit {
    background-color: #c9a063; /* ゴールド系 */
    color: #fff;
    border: none;
    width: 100%;
    max-width: 400px;
    padding: 18px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 4px;
    -webkit-appearance: none; /* iOS対策 */
}
.wpcf7-submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- CF7専用のエラー表示・メッセージ装飾 --- */

/* 入力エラー時の枠線 */
.wpcf7-not-valid {
    border-color: #e74c3c !important;
    background-color: #fff8f8 !important;
}

/* エラーメッセージテキスト */
.wpcf7-not-valid-tip {
    font-size: 0.8rem;
    color: #e74c3c;
    margin-top: 5px;
    font-weight: bold;
}

/* 送信完了・失敗メッセージの枠 */
.wpcf7-response-output {
    border: none !important; /* デフォルトの枠線を消す */
    border-radius: 4px;
    padding: 15px !important;
    margin: 20px 0 0 !important;
    text-align: center;
    font-weight: bold;
}

/* 送信成功時 */
.wpcf7 form.sent .wpcf7-response-output {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb !important;
}

/* 送信失敗・エラー時 */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb !important;
}

/* 読み込み中のアイコン位置調整 */
.wpcf7-spinner {
    margin-top: 10px;
}

/* --- フッター --- */
.footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .form-wrapper { padding: 30px 20px; }
    .wpcf7-submit { width: 100%; }
}