/**
 * Beautiful Contact Form Styles
 * Modern, responsive contact form with smooth animations
 */

/* Contact Form Section Background */
#hs-contact-section {
    position: relative;
    overflow: hidden;
}

#hs-contact-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: url(/img/contact-bg-left-white.png) left center no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 4;
}

#hs-contact-section::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: url(/img/contact-bg-right-white.png) right center no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
}

/* Contact Section Container */
.hs-contact-section {
    position: relative;
    z-index: 2;
}

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

/* Contact Form Container */
.contact-form-wrapper {
    width: 100%;
    max-width: calc(100vw - 80px);
    margin: 0 auto;
    z-index: 4;
    position: relative;
}

#contact-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.6s ease-out;
}

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

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
    animation: fadeIn 0.8s ease-out forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form Labels */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Form Inputs and Textarea */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.h-captcha {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Error States */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    background-color: #fdeaea;
}

.form-group input.error:focus,
.form-group textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Error Messages */
.error-message {
    display: block;
    margin-top: 6px;
    color: #e74c3c;
    font-size: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

/* CAPTCHA Container */
.form-group.captcha-group {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.h-captcha {
    width: auto;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* reCAPTCHA Badge Adjustment */
.grecaptcha-badge {
    visibility: hidden;
}

/* Form Messages */
.contact-form-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: slideInDown 0.4s ease;
}

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

.contact-form-message.success {
    background-color: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.contact-form-message.success::before {
    content: "✓";
    margin-right: 10px;
    font-size: 18px;
    font-weight: bold;
}

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

.contact-form-message.error::before {
    content: "✕";
    margin-right: 10px;
    font-size: 18px;
    font-weight: bold;
}

/* Submit Button */
.form-group.submit-group {
    margin-top: 35px;
    margin-bottom: 0;
}

#contact-submit {
    width: 100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

#contact-submit::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#contact-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

#contact-submit:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

#contact-submit:active:not(:disabled) {
    transform: translateY(0);
}

#contact-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    #contact-form {
        padding: 30px 20px;
        margin: 0 15px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 14px;
    }

    #contact-submit {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #contact-form {
        padding: 20px 15px;
        margin: 0 10px;
    }

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

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

/* Loading State Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Two Column Layout (Optional - for wider screens) */
@media (min-width: 900px) {
    .form-group.form-row {
        display: flex;
        gap: 20px;
    }

    .form-group.form-row .form-group {
        flex: 1;
    }
}

.center {
    display: flex;
    justify-content: center;
}

.flex-1 {
    flex: 1;
}