/* ==========================================
   Contact Page Styles
   ========================================== */

/* ページ全体のコンテナ */
.contact-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    padding: 80px 0;
    min-height: calc(100vh - 150px);
}

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

/* タイトルエリア */
.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header .en-title {
    font-family: 'Patua One', serif;
    font-size: 3rem;
    color: var(--navy-blue);
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.contact-header .en-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-gold);
}

.contact-header .jp-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 18px;
}

.contact-lead {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #475569;
}

/* フォーム本体のカード（グラスモルフィズム風） */
.contact-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 45px rgba(26, 43, 73, 0.08);
}

@media (max-width: 768px) {
    .contact-page {
        padding: 40px 0;
    }
    .contact-card {
        padding: 30px 20px;
        border-radius: 12px;
    }
}

/* フォームグループ */
.form-group {
    margin-bottom: 30px;
    position: relative;
}

.form-group:last-of-type {
    margin-bottom: 40px;
}

.form-label-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy-blue);
}

/* 必須・任意バッジ */
.badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    line-height: 1.2;
}

.badge.required {
    background-color: #ef4444;
    color: #ffffff;
}

.badge.optional {
    background-color: #cbd5e1;
    color: #475569;
}

/* 入力フィールドの基本設定 */
.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(180, 150, 80, 0.15);
}

/* テキストエリア */
textarea.form-control {
    min-height: 180px;
    resize: vertical;
}

/* セレクトボックスの装飾 */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 45px;
    cursor: pointer;
}

/* 同意チェックボックス */
.agreement-wrapper {
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.custom-checkbox-label {
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
    line-height: 1.6;
}

.custom-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox-dummy {
    width: 22px;
    height: 22px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-right: 12px;
    background-color: #f8fafc;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.custom-checkbox-label:hover .custom-checkbox-dummy {
    border-color: var(--primary-gold);
    background-color: #f1f5f9;
}

.custom-checkbox-input:checked ~ .custom-checkbox-dummy {
    background-color: var(--primary-gold);
    border-color: var(--primary-gold);
}

.custom-checkbox-input:checked ~ .custom-checkbox-dummy::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox-label a {
    color: var(--primary-gold);
    text-decoration: underline;
    font-weight: 500;
}

/* エラーステートのスタイル */
.form-group.has-error .form-control {
    border-color: #f87171;
    background-color: #fff5f5;
}

.form-group.has-error .form-control:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeInUp 0.3s ease forwards;
}

/* 送信ボタンエリア */
.form-submit-wrapper {
    text-align: center;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-green) 0%, #2d5635 100%);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 16px 50px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(58, 110, 67, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 220px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(58, 110, 67, 0.35);
    background: linear-gradient(135deg, #44804d 0%, var(--primary-green) 100%);
    opacity: 1; /* グローバルホバーをリセット */
}

.btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(58, 110, 67, 0.2);
}

.btn-submit:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ローディングスピナー */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

.btn-submit.is-loading .spinner {
    display: inline-block;
}

.btn-submit.is-loading .btn-text {
    opacity: 0.8;
}

/* 送信完了メッセージ画面 */
.thanks-card {
    text-align: center;
    padding: 60px 40px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.thanks-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: rgba(58, 110, 67, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px auto;
}

.thanks-icon {
    color: var(--primary-green);
}

.thanks-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 20px;
}

.thanks-message {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 40px;
}

.thanks-btn-wrapper {
    display: flex;
    justify-content: center;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-home:hover {
    background-color: #e2e8f0;
    color: var(--navy-blue);
    opacity: 1;
}

/* アニメーション */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
