/* =========================================================================
   General Contact Form Variables & Overrides (Light Theme)
   ========================================================================= */
:root {
    /* Redefine contact form specific variables for the light theme */
    --c-contact-bg: #ffffff;
    --c-contact-surface: #f8f9fa;
    --c-contact-border: #e2e8f0;
    --c-contact-text: #334155;
    --c-contact-heading: #0f172a;

    --c-contact-primary: #38b48b;
    /* Trustworthy Green */
    --c-contact-primary-hover: #2d9472;
    --c-contact-primary-light: rgba(56, 180, 139, 0.1);

    --c-contact-error: #ef4444;
    --c-contact-error-bg: rgba(239, 68, 68, 0.05);

    --shadow-contact: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-contact-focus: 0 0 0 3px var(--c-contact-primary-light);
}

/* =========================================================================
   Layout & Typography
   ========================================================================= */
.contact-page-bg {
    background-color: #f1f5f9;
    /* Light gray-blue background for the whole page */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.contact-main {
    flex-grow: 1;
    padding: 120px 0 80px;
}

/* Header Override for Light Theme */
.contact-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--c-contact-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Footer Override for Light Theme */
.contact-footer {
    background: #ffffff;
    border-top: 1px solid var(--c-contact-border);
    padding: 60px 0;
    text-align: center;
}

.contact-footer .company-name {
    color: var(--c-contact-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 20px;
}

.contact-footer .company-name-en {
    color: #64748b;
}

.contact-footer .copyright {
    color: #94a3b8;
    border-top-color: var(--c-contact-border);
}

/* =========================================================================
   Form Container & Structure
   ========================================================================= */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.contact-header-text {
    text-align: center;
    margin-bottom: 40px;
}

.contact-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--c-contact-heading);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.contact-lead {
    font-size: 1.1rem;
    color: var(--c-contact-text);
    line-height: 1.6;
}

.contact-wrapper {
    background: var(--c-contact-bg);
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--shadow-contact);
    border: 1px solid var(--c-contact-border);
}

/* =========================================================================
   Form Elements
   ========================================================================= */
.form-group {
    margin-bottom: 32px;
}

.form-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--c-contact-heading);
    font-size: 0.95rem;
}

.required-badge {
    background-color: var(--c-contact-primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.optional-badge {
    background-color: #94a3b8;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 12px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 16px;
    background-color: var(--c-contact-surface);
    border: 1px solid var(--c-contact-border);
    border-radius: 8px;
    color: var(--c-contact-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--c-contact-primary);
    background-color: var(--c-contact-bg);
    box-shadow: var(--shadow-contact-focus);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 180px;
    line-height: 1.6;
}

/* =========================================================================
   Checkbox & Agreement
   ========================================================================= */
.agreement-group {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--c-contact-text);
    font-weight: 500;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--c-contact-surface);
    border: 2px solid var(--c-contact-border);
    border-radius: 6px;
    margin-right: 12px;
    transition: all 0.2s ease;
}

.checkbox-input:checked~.checkbox-custom {
    background-color: var(--c-contact-primary);
    border-color: var(--c-contact-primary);
}

.checkbox-custom::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-input:checked~.checkbox-custom::after {
    display: block;
}

.checkbox-input:focus~.checkbox-custom {
    box-shadow: var(--shadow-contact-focus);
}

.policy-link {
    color: var(--c-contact-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.policy-link:hover {
    color: var(--c-contact-primary-hover);
}

/* =========================================================================
   Submit Button
   ========================================================================= */
.submit-group {
    text-align: center;
}

.btn-submit {
    background-color: var(--c-contact-primary);
    color: white;
    border: none;
    padding: 18px 60px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 280px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(56, 180, 139, 0.25);
}

.btn-submit:hover {
    background-color: var(--c-contact-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56, 180, 139, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

/* =========================================================================
   Error & Status
   ========================================================================= */
.error-message {
    color: var(--c-contact-error);
    font-size: 0.85rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control.is-invalid {
    border-color: var(--c-contact-error);
    background-color: var(--c-contact-error-bg);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.global-error {
    background-color: var(--c-contact-error-bg);
    border-left: 4px solid var(--c-contact-error);
    padding: 16px 20px;
    margin-bottom: 32px;
    border-radius: 0 8px 8px 0;
}

.global-error p {
    color: var(--c-contact-error);
    font-weight: 500;
}

/* =========================================================================
   Success Message Status
   ========================================================================= */
.success-message {
    background: var(--c-contact-bg);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-contact);
    border: 1px solid var(--c-contact-border);
    animation: fadeInDown 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--c-contact-primary-light);
    color: var(--c-contact-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
}

.success-title {
    font-size: 2rem;
    color: var(--c-contact-heading);
    margin-bottom: 24px;
}

.success-text {
    color: var(--c-contact-text);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    background-color: var(--c-contact-surface);
    color: var(--c-contact-heading);
    border: 1px solid var(--c-contact-border);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background-color: #e2e8f0;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media screen and (max-width: 768px) {
    .contact-wrapper {
        padding: 32px 24px;
    }

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

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

    .btn-submit {
        width: 100%;
        min-width: auto;
    }
}