.contact-section {
    background: black;
    background-image: url('https://connecttech.vn/assets/client/images/theme/background-theme.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 4rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Left Column - Content */
.contact-content {
    gap: 2rem;
    display: flex;
    flex-direction: column;
}

.contact-title {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: white;
    text-transform: uppercase;
}

.contact-description {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: justify;
    margin: 0;
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon-wrapper {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 48px;
    flex-shrink: 0;
}

.contact-icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.contact-item-content {
    flex: 1;
}

.contact-item-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: white;
}

.contact-item-text {
    color: #d1d5db;
    text-align: justify;
    transition: color 0.3s ease;
}

.contact-item-text:hover {
    color: white;
    text-decoration: none;
}

/* Right Column - Contact Form */
.contact-form-wrapper {
    margin-top: 2rem;
}

.contact-form-container {
    background: transparent;
    padding: 2rem;
    margin: 0;
    border-radius: 1rem;
    border: 1px solid white;
}

.contact-form-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-transform: uppercase;
    color: white;
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.contact-input,
.contact-textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid white;
    padding: 0.75rem 0;
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.contact-input:focus,
.contact-textarea:focus {
    border-bottom-color: #a855f7;
    box-shadow: 0 1px 0 0 #a855f7;
}

.contact-textarea {
    resize: none;
    font-family: inherit;
}

/* reCAPTCHA */
.recaptcha-wrapper {
    transform: scale(0.7);
    transform-origin: top left;
}

/* Submit Button */
.form-submit-contact {
    padding-top: 1rem;
}

/* ================================
   OPTIMIZED SUBMIT BUTTON
   ================================ */

.contact-submit-btn {
    background: white;
    color: var(--color-main, #3b82f6);
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    font-size: 1rem;
    min-height: 48px;
    /* Prevent height jumping */
    overflow: hidden;
    will-change: transform;
    /* Hardware acceleration */
    outline: none;
}

.contact-submit-btn:hover:not(.loading) {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contact-submit-btn:active:not(.loading) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.contact-submit-btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Button Icon */
.contact-btn-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-submit-btn:hover:not(.loading) .contact-btn-icon {
    transform: translateX(2px);
}

/* Button Text */
.contact-btn-text {
    color: inherit;
    font-weight: inherit;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Spinner - Optimized for smooth animation */
.contact-btn-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Dual ring spinner for smoothness */
.contact-btn-spinner::before,
.contact-btn-spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    will-change: transform;
}

/* Primary ring */
.contact-btn-spinner::before {
    border: 2px solid transparent;
    border-top: 2px solid var(--color-main, #3b82f6);
    border-right: 2px solid var(--color-main, #3b82f6);
    animation: spinner-rotate 0.8s linear infinite;
}

/* Secondary ring for visual depth */
.contact-btn-spinner::after {
    border: 2px solid transparent;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    border-left: 2px solid rgba(59, 130, 246, 0.3);
    animation: spinner-rotate-reverse 1.2s linear infinite;
}

/* Loading State */
.contact-submit-btn.loading {
    cursor: not-allowed;
    pointer-events: none;
    background: #f1f5f9;
    transform: none !important;
    box-shadow: none !important;
}

.contact-submit-btn.loading .btn-text {
    opacity: 0;
    transform: translateY(4px);
}

.contact-submit-btn.loading .contact-btn-spinner {
    opacity: 1;
    visibility: visible;
}

/* Prevent interaction during loading */
.contact-submit-btn.loading * {
    user-select: none;
    pointer-events: none;
}

/* Smooth spinner animations */
@keyframes spinner-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spinner-rotate-reverse {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .contact-submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .contact-btn-icon {
        width: 1rem;
        height: 1rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    .contact-submit-btn,
    .contact-btn-text,
    .contact-btn-icon {
        transition: none;
    }

    .contact-btn-spinner::before,
    .contact-btn-spinner::after {
        animation: none;
    }

    /* Static loading indicator */
    .contact-submit-btn.loading .contact-btn-spinner::before {
        border: 2px solid var(--color-main, #3b82f6);
        opacity: 0.7;
    }

    .contact-submit-btn.loading .contact-btn-spinner::after {
        display: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .contact-submit-btn {
        border: 2px solid var(--color-main, #3b82f6);
    }

    .contact-btn-spinner::before,
    .contact-btn-spinner::after {
        border-width: 3px;
    }
}

/* Touch devices optimization */
@media (hover: none) and (pointer: coarse) {
    .contact-submit-btn:hover {
        transform: none;
        box-shadow: none;
        background: white;
    }

    .contact-submit-btn:active:not(.loading) {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Responsive Design */
@media (min-width: 576px) {
    .contact-section {
        padding: 4rem 1rem;
    }

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

    .contact-description {
        font-size: 1rem;
    }

    .contact-form-wrapper {
        margin-left: 1rem;
    }
}

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

    .contact-description {
        font-size: 1.125rem;
    }
}

@media (min-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .contact-form-wrapper {
        margin-top: 0;
        margin-left: 0;
    }
}

@media (min-width: 1200px) {
    .contact-title {
        font-size: 1.875rem;
    }
}

/* Form Validation States */
.contact-input:invalid,
.contact-textarea:invalid {
    border-bottom-color: white;
}

.contact-input.not-valid,
.contact-textarea.not-valid {
    border-bottom-color: #ef4444;
}

.contact-input.is-valid,
.contact-textarea.is-valid {
    border-bottom-color: #10b981;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .contact-submit-btn,
    .contact-item-text,
    .contact-input,
    .contact-textarea {
        transition: none;
    }

    .contact-btn-spinner::before {
        animation: none;
    }
}

/* Focus states */
.contact-submit-btn:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

.contact-item-text:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 0.25rem;
}


