#contact {
    padding-block: 40px;
    scroll-margin-top: 72px;
    background: linear-gradient(160deg, #f5f8fc, #edf3fa);
}

#contact .section-heading { margin-bottom: 24px; }
#contact .contact-heading { padding-top: 12px; }
#contact .contact-heading h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.2; }
#contact .contact-heading h2::after { left: 0; transform: none; width: 48px; bottom: -12px; }
#contact .contact-heading p { margin-top: 24px !important; margin-bottom: 0; font-size: 15px; line-height: 1.65; }

#contact .contact-us { padding-block: 0; }
#contact .contact-us li { padding-block: 6px !important; }
#contact .contact-us > p { color: #213a57; font-size: 18px; font-weight: 500; }
#contact .contact-us .media { align-items: center; }
#contact .contact-us .social-icon {
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 12px;
    color: #0d47a1;
    background: #fff;
    box-shadow: 0 4px 14px #183a6410;
}

#contact .contact-card {
    position: relative;
    padding: 24px;
    border: 1px solid #dce5f0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 60px -24px #143d6b3b, 0 2px 8px #143d6b06;
    text-align: start !important;
}

.contact-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.contact-card-heading h3 { margin: 0; color: #17324d; font-size: 21px; font-weight: 600; line-height: 1.35; }
.contact-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    height: 40px;
    border: 1px solid #f6dfb4;
    border-radius: 15px;
    background: #fff7e8;
    color: #915b07;
    font-size: 22px;
}

#contact-form .form-group { margin-bottom: 14px; text-align: start; }
#contact-form .form-group > label { margin-bottom: 5px; color: #30465f; font-size: 14px; font-weight: 500; }
#contact-form .form-control {
    height: 46px;
    padding: 10px 14px;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f8fafd;
    color: #17324d;
    box-shadow: none;
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#contact-form .form-control::placeholder { color: #8997a7; font-weight: 400; }
#contact-form .form-control:focus { border-color: #3273c5; background: #fff; box-shadow: 0 0 0 4px #0d47a112; }
#contact-form textarea.form-control { min-height: 96px; height: 96px; resize: vertical; }
#contact-form .custom-control-label { color: #40536b; font-size: 13px; line-height: 1.7; cursor: pointer; }
#contact-form .contact-legal { margin-bottom: 0 !important; color: #68788d !important; font-size: 12px; line-height: 1.7; }
#contact-form .contact-legal a { color: #385a83; text-decoration: underline; text-underline-offset: 2px; }

#contact-form button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    height: auto;
    margin-top: 16px !important;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 8px 18px #0d47a123;
    transition: transform .18s ease, box-shadow .18s ease;
}
#contact-form button[type="submit"]:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 24px #0d47a12e; }
#contact-form button[type="submit"]:focus-visible { outline: 3px solid #fbb437; outline-offset: 4px; }
#contact-form .contact-submit-icon { padding-right: 0 !important; }

#contact-form button:disabled {
    opacity: 1;
    cursor: wait;
    box-shadow: none;
}

.contact-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    vertical-align: middle;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    animation: contact-spin 0.8s linear infinite;
}

.is-sending .contact-submit-spinner {
    display: inline-block;
}

.is-sending .contact-submit-icon {
    display: none;
}

#contact-form-status {
    margin: 12px 0 0;
    padding: 0;
    text-align: start;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#contact-form-status:empty {
    display: none;
}

#contact-form-status.pending,
#contact-form-status.success,
#contact-form-status.error {
    display: flex;
    position: relative;
    align-items: center;
    min-height: 56px;
    padding: 12px;
    padding-inline-start: 58px;
    border: 1px solid;
    border-radius: 16px;
    font-weight: 500;
    animation: contact-status-in .22s ease-out;
}

#contact-form-status::before {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    border-radius: 50%;
}

#contact-form-status.pending::before {
    content: '';
    width: 24px;
    height: 24px;
    inset-inline-start: 17px;
    margin-top: -12px;
    border: 2px solid #bed0eb;
    border-top-color: #0d47a1;
    animation: contact-spin .8s linear infinite;
}

#contact-form-status.pending {
    color: #164077;
    background: #edf4ff;
    border-color: #bfd3f0;
}

#contact-form-status.success {
    color: #14532d;
    background: #edf9f0;
    border-color: #a7d8b5;
}

#contact-form-status.success::before {
    content: '\2713';
    background: #d2efdc;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

#contact-form-status.error {
    color: #991b1b;
    background: #fff1f1;
    border-color: #efb4b4;
}

#contact-form-status.error::before {
    content: '!';
    background: #fbe0e0;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

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

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

@media (max-width: 575px) {
    #contact { padding-block: 28px; }
    #contact .contact-card { padding: 20px; border-radius: 20px; }
    #contact .contact-us { padding-top: 0; }
    .contact-card-heading { gap: 12px; margin-bottom: 18px; }
    .contact-card-heading h3 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
    .contact-submit-spinner,
    #contact-form-status,
    #contact-form-status.pending::before { animation: none; }
    #contact-form button[type="submit"], #contact-form .form-control { transition: none; }
}
