/* お問い合わせページ専用スタイル */

/* WordPress管理バー対応 */
body.admin-bar .header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }
}

body.admin-bar .contact-form-section {
    padding-top: 140px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .contact-form-section {
        padding-top: 146px;
    }
}

.contact-form-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.contact-page-title {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    color: #333;
    margin-bottom: 20px;
    position: relative;
}

.contact-page-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #093053);
    margin: 20px auto 0;
    border-radius: 2px;
}

.contact-page-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 60px;
    line-height: 1.8;
}

.contact-form {
    background: white;
    border-radius: 20px;
    padding: 60px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.required {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.optional {
    background: #95a5a6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group > div {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.checkbox-text {
    color: #333;
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

.btn {
    display: inline-block;
    padding: 18px 36px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #093053);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-large {
    padding: 20px 50px;
    font-size: 18px;
}

/* ==================================================
   Contact Form 7 Specific Styles
   ================================================== */

/* Contact Form 7のフォーム要素 */
.wpcf7 {
    width: 100%;
}

.wpcf7-form {
    background: transparent;
}

.wpcf7-form .form-group {
    margin-bottom: 30px;
}

.wpcf7-form label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: -5px;
}

/* チェックボックスグループだけを下に移動 */
.checkbox-group {
    margin-top: 10px !important;
}

/* Contact Form 7の入力フィールド */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
    width: 100% !important;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: white;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Contact Form 7のチェックボックス */
.wpcf7-form .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wpcf7-form .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.wpcf7-form .wpcf7-list-item input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    width: auto !important;
}

.wpcf7-form .wpcf7-list-item-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

/* Contact Form 7の送信ボタン */
.wpcf7-form input[type="submit"] {
    display: inline-block;
    padding: 20px 50px;
    background: linear-gradient(45deg, #667eea, #093053);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: auto !important;
}

.wpcf7-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Contact Form 7のエラーメッセージ */
.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

.wpcf7-validation-errors {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #e74c3c;
    font-weight: 500;
}

/* Contact Form 7の送信完了メッセージ */
.wpcf7-mail-sent-ok {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #22543d;
    font-weight: 500;
}

/* Contact Form 7の送信失敗メッセージ */
.wpcf7-mail-sent-ng {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #e74c3c;
    font-weight: 500;
}

/* Contact Form 7のスピナーを非表示 */
.wpcf7-spinner {
    display: none !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contact Form 7が無効時の表示 */
.cf7-not-active {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
}

.cf7-not-active details {
    text-align: left;
}

.cf7-not-active summary {
    font-weight: 600;
    color: #333;
}

.cf7-not-active pre {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}




/* フォームの境界線を削除 */
.wpcf7-form {
    border: none !important;
}

/* fieldsetの境界線を削除 */
.wpcf7-form fieldset {
    border: none !important;
    margin: 0;
    padding: 0;
}

/* Contact Form 7のデフォルトスタイルをリセット */
.wpcf7 form {
    border: none !important;
}

/* その他の不要な境界線を削除 */
.wpcf7 fieldset {
    border: none !important;
    margin: 0;
    padding: 0;
}




/* Contact Form 7 スクリーンリーダー用の重複メッセージのみ非表示 */
.screen-reader-response {
    display: none !important;
}

/* 送信ボタン下のメッセージは表示（元に戻す） */
.wpcf7-response-output {
    display: block !important;
}

/* Contact Form 7 送信ボタン下のメッセージをセンタリング・下に移動 */
.wpcf7-response-output {
    display: block !important;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 5px;
    color: #e74c3c;
    font-weight: bold;
}

/* 成功メッセージの場合のスタイル */
.wpcf7-response-output.wpcf7-mail-sent-ok {
    color: #155724;
}


/* レスポンシブデザイン */
@media (max-width: 768px) {
    .contact-form-section {
        padding: 100px 20px 60px;
    }
    
    body.admin-bar .contact-form-section {
        padding-top: 126px;
    }
    
    @media screen and (max-width: 782px) {
        body.admin-bar .contact-form-section {
            padding-top: 146px;
        }
    }
    
    .contact-page-title {
        font-size: 28px;
    }
    
    .contact-page-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .contact-form {
        padding: 40px 30px;
        border-radius: 15px;
    }
    
    .checkbox-group > div {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea,
    .wpcf7-form input[type="text"],
    .wpcf7-form input[type="email"],
    .wpcf7-form input[type="tel"],
    .wpcf7-form textarea {
        padding: 12px;
        font-size: 16px; /* iOSのズーム防止 */
    }
    
    .btn,
    .wpcf7-form input[type="submit"] {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    .btn-large,
    .wpcf7-form input[type="submit"] {
        padding: 18px 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .contact-page-title {
        font-size: 24px;
    }
    
    .contact-page-subtitle {
        font-size: 14px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea,
    .wpcf7-form input[type="text"],
    .wpcf7-form input[type="email"],
    .wpcf7-form input[type="tel"],
    .wpcf7-form textarea {
        padding: 10px;
    }
    
    .btn,
    .wpcf7-form input[type="submit"] {
        padding: 12px 25px;
        font-size: 14px;
    }
}


/* アクティブリンク */
.nav-list li a.active {
    color: #4a90e2;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .contact-form-section {
        padding: 100px 0 60px;
    }
    
    .contact-page-title {
        font-size: 1.8rem;
    }
    
    .contact-page-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .contact-form {
        padding: 25px;
        margin: 0 15px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* iOSのズーム防止 */
    }
    
    .btn-large {
        width: 100%;
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .checkbox-group > div {
        display: block;
    }
    
    .checkbox-label {
        display: block;
        margin-bottom: 10px;
    }
}

/* フォーム送信成功メッセージ */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeInScale 0.5s ease-out forwards;
}

.success-message h2 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.success-message p {
    color: #666;
    margin-bottom: 20px;
}

.success-message .btn {
    margin-top: 10px;
}

/* メッセージオーバーレイ */
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-overlay.active {
    opacity: 1;
}

/* バリデーションエラー表示 */
.validation-errors {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #e74c3c;
    border-left: 4px solid #e74c3c;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    z-index: 10001;
    animation: slideInRight 0.3s ease-out;
}

.validation-errors h3 {
    color: #e74c3c;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.validation-errors ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.validation-errors li {
    color: #333;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.validation-errors li::before {
    content: '•';
    color: #e74c3c;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* エラーメッセージ */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10000;
    max-width: 500px;
    width: 90%;
}

.error-message h3 {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.error-message p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* フォーム入力エラー状態 */
.form-group.error input,
.form-group.error textarea {
    border-color: #e74c3c;
}

.form-group.error .error-text {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

/* ローディング状態 */
.btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-large:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* アニメーション */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* レスポンシブ対応（追加） */
@media (max-width: 768px) {
    .validation-errors {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .error-message {
        padding: 30px 20px;
    }
    
    .success-message {
        padding: 30px 20px;
        width: 90%;
    }
}