/**
 * Contact Form Styles - Professional Modern Design
 * reCAPTCHA v3 Integration
 */

:root {
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --success: #10b981;
    --error: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* ===== Contact Form Card ===== */

.contact-form-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    max-width: 600px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form-card:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

.contact-form-card h3 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

/* ===== Form Group ===== */

.mb-3 {
    margin-bottom: 1.75rem;
}

/* ===== Input Fields ===== */

.form-control {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    color: var(--gray-900);
}

.form-control::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-control:hover:not(:focus) {
    border-color: var(--gray-300);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
    font-family: inherit;
}

/* ===== Submit Button ===== */

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 1.125rem 2rem;
    border-radius: 10px;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

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

.btn-submit:hover:not(:disabled)::before {
    left: 100%;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(-2px);
}

.btn-submit:disabled {
    background: linear-gradient(135deg, var(--gray-300) 0%, var(--gray-400) 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    opacity: 0.8;
}

.btn-submit i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1em;
}

.btn-submit:hover:not(:disabled) i.fa-paper-plane {
    transform: translateX(4px) translateY(-4px) rotate(-15deg);
}

.btn-submit:disabled i.fa-spinner {
    animation: spin 1.2s linear infinite;
}

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

/* ===== reCAPTCHA Disclaimer ===== */

.recaptcha-disclaimer {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    line-height: 1.7;
    font-weight: 500;
}

.recaptcha-disclaimer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.recaptcha-disclaimer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.recaptcha-disclaimer a:hover {
    color: var(--primary-dark);
}

.recaptcha-disclaimer a:hover::after {
    width: 100%;
}

/* ===== Form Messages ===== */

.form-message {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    display: none;
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
    font-weight: 500;
    font-size: 0.95rem;
}

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

.form-message-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    color: #065f46;
    border-left-color: var(--success);
    border: 1px solid #a7f3d0;
}

.form-message-success::before {
    content: '✓ ';
    font-weight: 800;
    margin-right: 0.5rem;
}

.form-message-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fef5f5 100%);
    color: #7f1d1d;
    border-left-color: var(--error);
    border: 1px solid #fecaca;
}

.form-message-error::before {
    content: '⚠ ';
    font-weight: 800;
    margin-right: 0.5rem;
}

/* ===== Accessibility ===== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Dark Mode ===== */

@media (prefers-color-scheme: dark) {
    :root {
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
    }

    .contact-form-card {
        background: #1e293b;
        border-color: #334155;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .contact-form-card h3 {
        color: #f8fafc;
    }

    .form-control {
        background: #0f172a;
        border-color: #334155;
        color: #f8fafc;
    }

    .form-control::placeholder {
        color: #64748b;
    }

    .form-control:focus {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    }

    .recaptcha-disclaimer {
        color: #94a3b8;
        border-top-color: #334155;
    }

    .recaptcha-disclaimer a {
        color: var(--primary-light);
    }
}

/* ===== Responsive Design ===== */

@media (max-width: 768px) {
    .contact-form-card {
        padding: 2rem;
        border-radius: 12px;
    }

    .contact-form-card h3 {
        font-size: 1.625rem;
    }

    .mb-3 {
        margin-bottom: 1.5rem;
    }

    .form-control {
        padding: 0.8rem 1rem;
        font-size: 1rem;
        border-radius: 8px;
    }

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

    .btn-submit {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }

    .btn-submit i {
        font-size: 1em;
    }

    .recaptcha-disclaimer {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .contact-form-card {
        padding: 1.5rem;
        border-radius: 10px;
    }

    .contact-form-card h3 {
        font-size: 1.375rem;
        margin-bottom: 0.75rem;
    }

    .mb-3 {
        margin-bottom: 1.25rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 16px; /* Prevents iOS zoom */
        border-radius: 6px;
    }

    textarea.form-control {
        min-height: 100px;
    }

    .btn-submit {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
        border-radius: 6px;
    }

    .form-message {
        padding: 1rem 1.25rem;
        margin-top: 1rem;
    }

    .recaptcha-disclaimer {
        font-size: 0.7rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }
}

/* ===== Tablet Landscape ===== */

@media (max-width: 1024px) and (orientation: landscape) {
    .contact-form-card {
        padding: 2rem;
    }

    .mb-3 {
        margin-bottom: 1.25rem;
    }

    textarea.form-control {
        min-height: 100px;
    }
}
