/* ================================================================
   Google reCAPTCHA v3 Contact Form Styles
   Professional and Mobile-Responsive Design
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
}

body {
    display: flex;
    justify-content: center;
    align-items: start;
    min-height: 100vh;
    padding: 20px;
}*/
.body-wrap {
    display: flex;
    justify-content: center;
    align-items: start;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Container */
.container-wrap {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
}

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

/* Header */
.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.form-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
    color: white;
}

/* Form */
.contact-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.5;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    color: #bbb;
}

/* Error messages */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 6px;
    animation: shake 0.3s ease;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group.error input,
.form-group.error textarea {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Submit Button */
.form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.form-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

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

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-submit.loading {
    position: relative;
    color: transparent;
}

.form-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* reCAPTCHA Widget */
.recaptcha-wrapper {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.g-recaptcha {
    display: flex;
    justify-content: center;
    transform: scale(1);
    transform-origin: center;
    margin: 0 auto;
}

/* Adjust reCAPTCHA for mobile */
@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
    }
}

/* Alert Messages */
.alert {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    animation: slideInDown 0.3s ease-out;
}

.alert.show {
    display: block;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.alert-close {
    float: right;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert-close:hover {
    opacity: 1;
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

.char-counter.warning {
    color: #ff9800;
}

.char-counter.error {
    color: #dc3545;
}

/* Field Validation Feedback */
.form-group.valid input,
.form-group.valid textarea {
    border-color: #28a745;
    background-color: #f1fdf4;
}

/* Help Text */
.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-weight: 300;
}

/* Required Indicator */
.required {
    color: #dc3545;
    margin-left: 2px;
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container-wrap {
        border-radius: 8px;
    }

    .form-header {
        padding: 30px 20px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 11px 13px;
        font-size: 16px;
    }

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

    .form-submit {
        padding: 13px;
        font-size: 15px;
    }

    label {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container-wrap {
        border-radius: 6px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    }

    .form-header {
        padding: 25px 15px;
    }

    .form-header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .form-header p {
        font-size: 13px;
    }

    .contact-form {
        padding: 25px 15px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 4px;
    }

    .form-group textarea {
        min-height: 100px;
        font-size: 15px;
    }

    .form-submit {
        padding: 12px;
        font-size: 14px;
        margin-top: 8px;
    }

    label {
        font-size: 12px;
    }

    .error-message {
        font-size: 11px;
    }

    .help-text {
        font-size: 11px;
    }

    .char-counter {
        font-size: 11px;
    }

    .recaptcha-wrapper {
        padding: 12px;
        margin: 15px 0;
    }

    .g-recaptcha {
        transform: scale(0.85);
    }
}

/* Tablet Responsive Design */
@media (min-width: 769px) and (max-width: 1024px) {
    .form-header h1 {
        font-size: 26px;
    }

    .contact-form {
        padding: 35px;
    }
}

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

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .container-wrap {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .form-submit {
        display: none;
    }

    .alert {
        display: none;
    }
}

/* Focus visible for keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }

    .container-wrap {
        background-color: #2d3748;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .form-header {
        background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%);
    }

    .contact-form {
        background-color: #2d3748;
    }

    label {
        color: #e2e8f0;
    }

    .form-group input,
    .form-group textarea {
        background-color: #1a202c;
        color: #e2e8f0;
        border-color: #4a5568;
    }

    .form-group input:focus,
    .form-group textarea:focus {
        background-color: #2d3748;
        border-color: #667eea;
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: #718096;
    }

    .recaptcha-wrapper {
        background-color: #1a202c;
    }

    .help-text {
        color: #cbd5e0;
    }

    .char-counter {
        color: #a0aec0;
    }
}
