:root {
    --contact-navy: #153247;
    --contact-navy-light: #1d435d;
    --contact-blue: #087fc1;
    --contact-blue-dark: #075f91;
    --contact-sky: #68c5f0;
    --contact-ink: #172330;
    --contact-muted: #5f6d79;
    --contact-line: #d8e1e8;
    --contact-soft: #eef4f7;
    --contact-white: #ffffff;
    --contact-success: #166534;
    --contact-success-soft: #edf8f0;
    --contact-error: #9f2d24;
    --contact-error-soft: #fff1ef;
}

.contact-page {
    overflow: hidden;
}

.contact-page,
.contact-page * {
    box-sizing: border-box;
}

.contact-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
}

.contact-hero__guide {
    align-self: stretch;
    background: var(--contact-navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 32px;
}

.contact-hero__icon {
    color: var(--contact-sky);
    display: block;
    font-size: 38px;
    line-height: 1;
    margin-bottom: 22px;
}

.contact-hero__guide ul {
    display: grid;
    gap: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.contact-hero__guide li {
    align-items: center;
    color: var(--contact-white);
    display: flex;
    font-size: 14px;
    font-weight: 700;
    gap: 11px;
    line-height: 1.45;
}

.contact-hero__guide li::before {
    background: var(--contact-sky);
    content: '';
    display: block;
    flex: 0 0 18px;
    height: 2px;
}

.contact-primary-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.16fr) minmax(330px, 0.84fr);
    margin-bottom: 30px;
}

.contact-form-panel,
.contact-details-panel,
.contact-locations {
    background: var(--contact-white);
    border: 1px solid var(--contact-line);
    box-shadow: 0 8px 24px rgba(21, 47, 66, 0.06);
}

.contact-form-panel,
.contact-details-panel {
    padding: 34px 36px;
}

.contact-section-heading {
    border-bottom: 1px solid var(--contact-line);
    margin-bottom: 26px;
    padding-bottom: 22px;
}

.contact-section-label {
    color: var(--contact-blue-dark);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.contact-section-heading h2,
.contact-locations__heading h2 {
    color: var(--contact-ink);
    font-size: 25px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.contact-section-heading p,
.contact-locations__heading p {
    color: var(--contact-muted);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 0;
}

.contact-form {
    display: grid;
    gap: 20px;
    position: relative;
}

.contact-form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-field {
    min-width: 0;
}

.contact-field label {
    color: var(--contact-ink);
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 8px;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    background: #fbfcfd;
    border: 1px solid #bfcbd4;
    color: var(--contact-ink);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    min-width: 0;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
    width: 100%;
}

.contact-field input,
.contact-field select {
    height: 48px;
    padding: 0 14px;
}

.contact-field textarea {
    min-height: 150px;
    padding: 13px 14px;
    resize: vertical;
}

.contact-field input:hover,
.contact-field select:hover,
.contact-field textarea:hover {
    border-color: #8da2b1;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    background: var(--contact-white);
    border-color: var(--contact-blue);
    box-shadow: 0 0 0 3px rgba(8, 127, 193, 0.14);
    outline: 0;
}

.contact-select {
    position: relative;
}

.contact-select::after {
    border-bottom: 2px solid var(--contact-blue-dark);
    border-right: 2px solid var(--contact-blue-dark);
    content: '';
    height: 8px;
    pointer-events: none;
    position: absolute;
    right: 17px;
    top: 18px;
    transform: rotate(45deg);
    width: 8px;
}

.contact-select select {
    appearance: none;
    padding-right: 44px;
}

.contact-field__heading {
    align-items: baseline;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.contact-field__heading > span {
    color: var(--contact-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.contact-form__footer {
    align-items: center;
    border-top: 1px solid var(--contact-line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding-top: 20px;
}

.contact-form__footer p {
    color: var(--contact-muted);
    font-size: 12px;
    line-height: 1.55;
    margin: 0;
    max-width: 300px;
}

.contact-submit {
    align-items: center;
    background: var(--contact-blue-dark);
    border: 1px solid var(--contact-blue-dark);
    color: var(--contact-white);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.contact-submit:hover {
    background: var(--contact-blue);
    border-color: var(--contact-blue);
}

.contact-submit:focus-visible {
    outline: 3px solid rgba(8, 127, 193, 0.3);
    outline-offset: 3px;
}

.contact-submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

.contact-submit[aria-busy='true'] i {
    animation: contact-submit-pulse 900ms ease-in-out infinite alternate;
}

.contact-form-status {
    border-left: 4px solid;
    color: var(--contact-ink);
    font-size: 13px;
    line-height: 1.6;
    padding: 14px 16px;
}

.contact-form-status[hidden] {
    display: none;
}

.contact-form-status--success {
    background: var(--contact-success-soft);
    border-color: var(--contact-success);
    color: var(--contact-success);
}

.contact-form-status--error {
    background: var(--contact-error-soft);
    border-color: var(--contact-error);
    color: var(--contact-error);
}

.contact-form-status p {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

.contact-form-status p + p {
    margin-top: 4px;
}

.contact-form-status:focus {
    outline: 0;
}

.contact-form-unavailable {
    background: #fff7e8;
    border-left: 4px solid #d88720;
    color: #75420a;
    font-size: 13px;
    line-height: 1.65;
    margin-top: 20px;
    padding: 16px 18px;
}

.contact-protection-field {
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    height: 1px !important;
    overflow: hidden !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

.contact-branch-list {
    display: grid;
    gap: 18px;
}

.contact-branch-card {
    border: 1px solid var(--contact-line);
    min-width: 0;
}

.contact-branch-card > header {
    align-items: center;
    background: var(--contact-navy);
    display: flex;
    gap: 14px;
    padding: 18px 20px;
}

.contact-branch-card > header > span {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--contact-sky);
    display: flex;
    flex: 0 0 42px;
    font-size: 18px;
    height: 42px;
    justify-content: center;
}

.contact-branch-card small {
    color: #a9c4d5;
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.contact-branch-card h3 {
    color: var(--contact-white);
    font-size: 17px;
    line-height: 1.3;
    margin: 0;
}

.contact-branch-card__details {
    display: grid;
    gap: 12px;
    padding: 19px 20px 20px;
}

.contact-branch-card__details > div {
    align-items: flex-start;
    color: var(--contact-muted);
    display: grid;
    font-size: 13px;
    gap: 10px;
    grid-template-columns: 18px minmax(0, 1fr);
    line-height: 1.55;
    min-width: 0;
}

.contact-branch-card__details i {
    color: var(--contact-blue-dark);
    line-height: 1.55;
    text-align: center;
}

.contact-branch-card__details address,
.contact-branch-card__details span {
    color: var(--contact-muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.55;
    margin: 0;
}

.contact-page .contact-branch-card__details a {
    color: var(--contact-blue-dark);
    overflow-wrap: anywhere;
    text-decoration: none;
}

.contact-page .contact-branch-card__details a:hover {
    text-decoration: underline;
}

.contact-branch-card__details > p {
    color: var(--contact-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.contact-locations {
    padding: 38px 40px 40px;
}

.contact-locations__heading {
    margin-bottom: 26px;
    max-width: 720px;
}

.contact-location-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-location {
    border: 1px solid var(--contact-line);
    min-width: 0;
    overflow: hidden;
}

.contact-location__header {
    align-items: center;
    background: var(--contact-navy);
    display: flex;
    justify-content: space-between;
    padding: 20px 22px;
}

.contact-location__header span {
    color: #a9c4d5;
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.contact-location__header h3 {
    color: var(--contact-white);
    font-size: 19px;
    line-height: 1.3;
    margin: 0;
}

.contact-location__header > i {
    color: var(--contact-sky);
    font-size: 24px;
}

.contact-location__map {
    border: 0;
    display: block;
    height: 300px;
    width: 100%;
}

.contact-location__hours {
    padding: 22px;
}

.contact-location__hours h4 {
    color: var(--contact-ink);
    font-size: 15px;
    margin: 0 0 12px;
}

.contact-location__hours table {
    border-collapse: collapse;
    font-size: 13px;
    width: 100%;
}

.contact-location__hours tr {
    border-top: 1px solid var(--contact-line);
}

.contact-location__hours th,
.contact-location__hours td {
    color: var(--contact-muted);
    font-weight: 400;
    padding: 9px 0;
    text-align: left;
    vertical-align: top;
}

.contact-location__hours td {
    color: var(--contact-ink);
    font-weight: 700;
    padding-left: 20px;
    text-align: right;
    white-space: nowrap;
}

@keyframes contact-submit-pulse {
    from {
        opacity: 0.45;
        transform: translateX(-1px);
    }

    to {
        opacity: 1;
        transform: translateX(1px);
    }
}

@media (max-width: 991px) {
    .contact-hero {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 0.4fr);
    }

    .contact-primary-grid {
        grid-template-columns: 1fr;
    }

    .contact-branch-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .contact-hero {
        grid-template-columns: 1fr;
        padding: 30px 24px;
    }

    .contact-hero__guide {
        padding: 24px;
    }

    .contact-hero__icon {
        font-size: 30px;
        margin-bottom: 17px;
    }

    .contact-form-panel,
    .contact-details-panel,
    .contact-locations {
        padding: 26px 22px;
    }

    .contact-form-grid,
    .contact-branch-list,
    .contact-location-grid {
        grid-template-columns: 1fr;
    }

    .contact-location__map {
        height: 280px;
    }
}

@media (max-width: 575px) {
    .contact-hero {
        padding: 26px 20px;
    }

    .contact-hero h1 {
        font-size: 30px;
    }

    .contact-form-panel,
    .contact-details-panel,
    .contact-locations {
        padding: 22px 18px;
    }

    .contact-form__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-form__footer p {
        max-width: none;
    }

    .contact-submit {
        width: 100%;
    }

    .contact-location__header,
    .contact-location__hours,
    .contact-branch-card > header,
    .contact-branch-card__details {
        padding-left: 18px;
        padding-right: 18px;
    }

    .contact-location__map {
        height: 240px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-field input,
    .contact-field select,
    .contact-field textarea,
    .contact-submit {
        transition: none;
    }

    .contact-submit[aria-busy='true'] i {
        animation: none;
    }
}

@media print {
    .contact-page {
        background: #ffffff;
    }

    .contact-hero__guide,
    .contact-form-panel,
    .contact-location__map {
        display: none;
    }

    .contact-hero,
    .contact-details-panel,
    .contact-locations,
    .contact-branch-card,
    .contact-location {
        box-shadow: none;
        break-inside: avoid;
    }

    .contact-hero,
    .contact-primary-grid,
    .contact-location-grid {
        display: block;
    }

    .contact-details-panel,
    .contact-locations,
    .contact-location {
        margin-bottom: 18px;
    }
}
