/* ────────────────────────────────────────────────
   Contact Page - MotorG お問い合わせ
   ──────────────────────────────────────────────── */

.contact-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.contact-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
}

.contact-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── フォームカード ─────────────────────────── */

.contact-form-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 680px;
    margin: 0 auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease;
}

.contact-form-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── フォームグループ ───────────────────────── */

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.form-group label .required-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
    letter-spacing: 0.05em;
}

/* ── 入力フィールド共通 ─────────────────────── */

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #3ea8ff;
    background: rgba(62, 168, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(62, 168, 255, 0.1);
}

/* ── セレクトボックス ───────────────────────── */

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.form-select {
    cursor: pointer;
    padding-right: 40px;
}

.form-select option {
    background: #1a1a2e;
    color: #fff;
}

/* ── テキストエリア ─────────────────────────── */

.form-textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.7;
}

/* ── 送信ボタン ─────────────────────────────── */

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

.form-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 16px 48px;
    background: linear-gradient(135deg, #3ea8ff 0%, #1a8cff 100%);
    color: #fff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.form-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(62, 168, 255, 0.35);
}

.form-submit-btn:hover::before {
    opacity: 1;
}

.form-submit-btn:active {
    transform: translateY(0);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-submit-btn .btn-icon {
    font-size: 1.1rem;
}

/* ── 注意テキスト ───────────────────────────── */

.form-note {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
}

.form-note a {
    color: #3ea8ff;
    text-decoration: none;
}

.form-note a:hover {
    text-decoration: underline;
}

/* ── バリデーションエラー ─────────────────── */

.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-error-msg {
    display: none;
    font-size: 0.78rem;
    color: #e74c3c;
    margin-top: 0.4rem;
    padding-left: 2px;
}

.form-input.is-invalid ~ .form-error-msg,
.form-textarea.is-invalid ~ .form-error-msg,
.form-select.is-invalid ~ .form-error-msg {
    display: block;
}

/* ── 送信中スピナー ─────────────────────────── */

.form-submit-btn .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.form-submit-btn.is-loading .btn-text,
.form-submit-btn.is-loading .btn-icon {
    display: none;
}

/* ── サンクスページ ─────────────────────────── */

.thanks-container {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.thanks-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.thanks-checkmark svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
    animation: drawCheck 0.6s ease 0.3s both;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes drawCheck {
    0% { stroke-dasharray: 0 50; }
    100% { stroke-dasharray: 50 50; }
}

.thanks-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.thanks-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.thanks-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.thanks-back-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* ── レスポンシブ ───────────────────────────── */

@media (max-width: 768px) {
    .contact-title {
        font-size: 1.7rem;
    }

    .contact-form-card {
        padding: 1.8rem 1.5rem 1.5rem;
        border-radius: 16px;
    }

    .form-submit-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }

    .thanks-title {
        font-size: 1.5rem;
    }
}
