/* Contact Page Specific Styles */

.contact-header {
    background:
        radial-gradient(ellipse at 10% 85%, rgba(255,255,255,0.14) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 10%, rgba(255,255,255,0.16) 0%, transparent 38%),
        linear-gradient(145deg, #1a3a6b 0%, #2c5aa0 55%, #4a7fd4 100%) !important;
    padding: 5rem 0 4rem 0 !important;
    position: relative;
    overflow: hidden;
}

.contact-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.10) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    pointer-events: none;
    opacity: 1;
}

.contact-header::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 55px rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.contact-header .container {
    position: relative;
    z-index: 2;
}

.contact-header h1 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.contact-header p,
.contact-header .lead,
.contact-header .text-muted {
    color: rgba(255, 255, 255, 0.88) !important;
}

.contact-header h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.65);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Contact Form Section */
.contact-form-section {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.form-intro h3 {
    color: var(--dark-color);
    font-weight: 700;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    transform: translateY(-1px);
}

.form-control:invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-control:valid {
    border-color: #28a745;
    background: #f8fff8;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Form Actions */
.form-actions {
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
    color: white;
}

/* Success Message */
.success-message {
    text-align: center;
    background: white;
    border-radius: 15px;
    padding: 4rem 3rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 2rem;
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h3 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.success-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Contact Information */
.contact-info-item {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
    position: relative;
    overflow: hidden;
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.contact-info-item:hover .contact-icon::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.contact-info-item h5 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-info-item p {
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Alert Enhancements */
.alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* Form Validation */
.form-control.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.form-control.is-valid {
    border-color: #28a745;
    background: #f8fff8;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading State */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-header {
        padding: 3rem 0 2rem 0;
    }
    
    .contact-form-section {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .success-message {
        padding: 3rem 2rem;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .contact-info-item {
        padding: 1.5rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .contact-form-section {
        padding: 1.5rem 1rem;
    }
    
    .success-message {
        padding: 2rem 1.5rem;
    }
    
    .form-actions .btn-primary {
        width: 100%;
        padding: 1rem;
    }
    
    .contact-info-item h5 {
        font-size: 1.1rem;
    }
    
    .contact-info-item p {
        font-size: 0.9rem;
    }
}

/* reCAPTCHA フローティングバッジを非表示（ページ内に帰属テキストを表示するため） */
.grecaptcha-badge {
    visibility: hidden !important;
}

/* reCAPTCHA 帰属テキスト */
.recaptcha-notice {
    font-size: 0.78rem;
    color: #9ca3af;
    line-height: 1.5;
}
.recaptcha-notice a {
    color: #9ca3af;
    text-decoration: underline;
}
.recaptcha-notice a:hover {
    color: #6b7280;
}
