/* Contact Us page. Reuses the site's card, pill and colour patterns. */
.contact-page {
    background: #eef2f8;
    color: #0f172a;
}

.contact-page [hidden] {
    display: none !important;
}

.contact-container {
    width: calc(100% - (2 * var(--bambu-container-gutter, 24px)));
    max-width: var(--bambu-container-max-width, 1290px);
    margin-inline: auto;
}

.contact-section {
    padding: 48px 0 80px;
    scroll-margin-top: 24px;
}

.contact-preview-note {
    margin: 0 0 20px;
    padding: 12px 16px;
    color: #92400e;
    font-size: 13px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

/* Form card */
.contact-card {
    position: relative;
    padding: 40px;
    overflow: hidden;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

.contact-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #43b263 0%, #3ba295 25%, #3b7ab5 55%, #7147a7 80%, #814272 100%);
}

.contact-form-alert {
    margin: 0 0 20px;
    padding: 12px 16px;
    color: #b91c1c;
    font-size: 13px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-topics {
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.contact-topics legend,
.contact-field > label:first-child:not(.contact-consent) {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.contact-topics legend {
    margin-bottom: 12px;
    font-size: 16px;
}

.contact-required {
    color: #dc2626;
}

.contact-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.contact-topic {
    position: relative;
    cursor: pointer;
}

.contact-topic input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.contact-topic span {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 16px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.contact-topic:hover span {
    border-color: #3ba295;
}

.contact-topic input:checked + span {
    color: #0f766e;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), rgba(59, 117, 179, 0.14));
    border-color: #0d9488;
    box-shadow: 0 0 0 1px #0d9488 inset;
}

.contact-topic input:focus-visible + span {
    outline: 2px solid #3b7ab5;
    outline-offset: 2px;
}

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

.contact-field-full {
    grid-column: 1 / -1;
}

.contact-field input[type="text"],
.contact-field input[type="email"],
.contact-field input[type="tel"],
.contact-field select,
.contact-field textarea {
    width: 100%;
    padding: 12px 14px;
    color: #0f172a;
    font-family: inherit;
    font-size: 14px;
    background: #ffffff;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.contact-field textarea {
    min-height: 150px;
    line-height: 1.6;
    resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    border-color: #3ba295;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 162, 149, 0.15);
}

.contact-field.has-error input,
.contact-field.has-error select,
.contact-field.has-error textarea,
.contact-field.has-error .contact-file {
    border-color: #f87171;
}

.contact-field-error {
    min-height: 0;
    margin: 6px 0 0;
    color: #dc2626;
    font-size: 12px;
}

.contact-field-error:empty {
    display: none;
}

.contact-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
}

.contact-file input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.contact-file-button {
    padding: 8px 14px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.contact-file-name {
    overflow: hidden;
    color: #64748b;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
}

/* The global ".bambu-page * { line-height: 1.3 }" also hits the text spans, so set it there too. */
.contact-page .contact-consent span {
    line-height: 22px;
}

/* Box centred on the first line of text (22px line, 16px box). */
.contact-consent input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    accent-color: #0d9488;
}

.contact-consent a {
    color: #0f766e;
}

.contact-submit {
    display: inline-flex;
    margin-top: 24px;
    font-family: inherit;
}

.contact-submit[disabled] {
    cursor: wait;
    opacity: 0.7;
}

/* Success state */
.contact-success {
    padding: 24px 0;
    text-align: center;
    animation: contact-fade-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.contact-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #35ad68, #3b7ab5 60%, #7855a2);
    border-radius: 50%;
}

.contact-success h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
}

.contact-success p {
    max-width: 520px;
    margin: 0 auto 24px;
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
}

.contact-secondary-btn {
    display: inline-flex;
    padding: 10px 20px;
    color: #0f766e;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #22c55e;
    border-radius: 12px;
}

@keyframes contact-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar */
.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-info-card,
.contact-links-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.contact-info-company {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-info-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #0f172a;
    font-size: 14px;
}

.contact-info-list span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.contact-info-list a {
    color: #0f766e;
    text-decoration: none;
}

.contact-response-card {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.14), rgba(59, 117, 179, 0.17));
    border: 1px solid #ccfbf1;
    border-radius: 16px;
}

.contact-response-icon {
    flex: 0 0 auto;
    color: #0d9488;
}

.contact-response-card p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.contact-response-card .contact-response-title {
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

.contact-links-title {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.contact-links-card a {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: #334155;
    font-size: 14px;
    text-decoration: none;
    border-top: 1px solid #f1f5f9;
}

.contact-links-card a:first-of-type {
    border-top: 0;
}

.contact-links-card a:hover {
    color: #0f766e;
}

/* Offices */
.contact-offices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.contact-office {
    padding: 28px;
    color: #ffffff;
    background: #111f39;
    border: 1px solid #1e293b;
    border-radius: 20px;
}

.contact-office-city {
    margin: 0 0 6px;
    color: #35ad68;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.contact-office h3 {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.contact-office p {
    margin: 0 0 18px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.55;
}

.contact-office a {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.contact-office a:hover {
    color: #6ee7b7;
}

@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 767px) {
    .contact-section {
        padding: 32px 0 56px;
    }

    .contact-card {
        padding: 28px 20px;
    }

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

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

    .contact-submit {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-success {
        animation: none;
    }
}
