/* =========================================================
   Contact us modal (#contactUsModal)
   Two panes inside one rounded card: navy pitch on the left, white form on
   the right. Everything is scoped under .contact-modal -- the modal used to
   carry .get-touch-modal, whose rules live in header.css and still style the
   unrelated demo partial, so this design gets its own namespace instead of
   fighting those.
   ========================================================= */

.contact-modal .modal-dialog {
    max-width: 1000px;
}

.contact-modal .modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .35);
}

.contact-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 9;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f3f8;
    color: #4b5570;
    font-size: 20px;
    line-height: 1;
    transition: background-color .18s ease, color .18s ease;
}

.contact-modal .modal-close:hover {
    background: #e3e7f0;
    color: #0d1530;
}

/* ---------- Left pane ---------- */

.contact-modal .cm-aside {
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100%;
    padding: 36px 32px;
    color: #fff;
    background: #0b1f52 url("../images/homepage/still-exploring.png") center bottom / cover no-repeat;
}

.contact-modal .cm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin: 0;
    padding: 9px 18px 9px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    color: #dce8ff;
    font-size: 14px;
    font-weight: 500;
}

.contact-modal .cm-eyebrow svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    color: #4d8dff;
}

.contact-modal .cm-headline {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -.01em;
}

.contact-modal .cm-headline span {
    color: #58a5ff;
}

.contact-modal .cm-desc {
    margin: 0;
    max-width: 30ch;
    color: rgba(255, 255, 255, .74);
    font-size: 15px;
    line-height: 1.65;
}

/* ---------- Perks ---------- */

.contact-modal .cm-perks {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-modal .cm-perk {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
}

.contact-modal .cm-perk-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
}

.contact-modal .cm-perk-icon svg {
    width: 20px;
    height: 20px;
}

.contact-modal .cm-perk-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.contact-modal .cm-perk-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.contact-modal .cm-perk-text {
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
    line-height: 1.4;
}

/* ---------- Stars (shared by every review row) ---------- */

.contact-modal .cm-stars {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

.contact-modal .cm-star {
    width: 11px;
    height: 11px;
}

.contact-modal .cm-stars--dark .cm-star {
    color: #1f2a44;
}

.contact-modal .cm-stars--upwork .cm-star {
    color: #14a800;
}

.contact-modal .cm-stars--google .cm-star {
    color: #fbbc05;
}

.contact-modal .cm-stars--clutch .cm-star {
    color: #ff3d2e;
}

/* ---------- Trusted-by card ---------- */

.contact-modal .cm-trust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff;
}

.contact-modal .cm-trust-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* Overlapping headshots -- each one pulled back over the previous. */
.contact-modal .cm-avatars {
    display: flex;
    flex-shrink: 0;
}

.contact-modal .cm-avatars img {
    width: 34px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
}

.contact-modal .cm-avatars img + img {
    margin-left: -12px;
}

.contact-modal .cm-trust-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.contact-modal .cm-trust-title {
    color: #101a33;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.contact-modal .cm-trust-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #101a33;
    font-size: 13px;
    font-weight: 700;
}

.contact-modal .cm-trust-upwork {
    display: grid;
    justify-items: center;
    gap: 3px;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid #e6e9f0;
}

.contact-modal .cm-trust-upwork img {
    width: 86px;
    height: auto;
}

/* ---------- Review-platform strip ---------- */

.contact-modal .cm-badges {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-modal .cm-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 48px;
    padding: 0 10px;
}

.contact-modal .cm-badge + .cm-badge {
    border-left: 1px solid rgba(255, 255, 255, .16);
}

/* The repo's Trustpilot/Clutch logo files are dark-on-transparent and would
   disappear against this pane, so all three badges are drawn inline: a white
   wordmark plus the platform's own mark/star colour. */
.contact-modal .cm-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.contact-modal .cm-brand svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Trustpilot renders its rating as filled tiles rather than bare stars. */
.contact-modal .cm-tiles {
    display: inline-flex;
    gap: 2px;
}

.contact-modal .cm-tile {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    background: #00b67a;
}

.contact-modal .cm-tile svg {
    width: 11px;
    height: 11px;
}

.contact-modal .cm-badge-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* ---------- Right pane: the form ---------- */

.contact-modal .cm-panel {
    padding: 34px 34px 30px;
    background: #fff;
}

.contact-modal .cm-panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.contact-modal .cm-panel-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
}

.contact-modal .cm-panel-icon svg {
    width: 22px;
    height: 22px;
}

.contact-modal .cm-title {
    margin: 0;
    color: #0d1530;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
}

.contact-modal .cm-subtitle {
    margin: 3px 0 0;
    color: #6b7590;
    font-size: 13px;
    line-height: 1.45;
}

.contact-modal .cm-form {
    display: grid;
    gap: 14px;
}

.contact-modal .cm-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-modal .cm-field {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

/* The phone field keeps Bootstrap's .mb-3 only because the form's error
   handler targets closest('.mb-3') when it injects a phone error -- the
   spacing itself comes from the grid gap. */
.contact-modal .cm-row > .mb-3 {
    margin-bottom: 0 !important;
}

.contact-modal .cm-label {
    margin: 0;
    color: #202b47;
    font-size: 13px;
    font-weight: 600;
}

.contact-modal .cm-label i {
    color: #e5484d;
    font-style: normal;
}

/* The icon is absolutely placed and the input padded around it, so the whole
   control keeps one border and one focus ring. */
.contact-modal .cm-control {
    position: relative;
    display: block;
}

.contact-modal .cm-control-icon {
    position: absolute;
    top: 21px;
    left: 13px;
    translate: 0 -50%;
    width: 17px;
    height: 17px;
    color: #98a2b8;
    pointer-events: none;
    z-index: 2;
}

.contact-modal .form-control,
.contact-modal .form-select {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1px solid #dde1ea;
    border-radius: 9px;
    background-color: #fff;
    color: #0d1530;
    font-size: 14px;
    line-height: 1.45;
}

.contact-modal .form-control::placeholder {
    color: #a3abbd;
}

.contact-modal .form-control:focus,
.contact-modal .form-select:focus {
    border-color: #2563eb;
    background-color: #fff;
    color: #0d1530;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

/* Select and textarea have no leading icon -- reclaim the padding. */
.contact-modal .form-select,
.contact-modal textarea.form-control {
    padding-left: 14px;
}

.contact-modal .form-select {
    appearance: none;
    padding-right: 38px;
    color: #a3abbd;
    cursor: pointer;
}

/* Turns solid once a real option is picked (the placeholder is value=""). */
.contact-modal .form-select.has-value {
    color: #0d1530;
}

.contact-modal .form-select option {
    color: #0d1530;
}

.contact-modal .cm-select-arrow {
    position: absolute;
    top: 21px;
    right: 13px;
    translate: 0 -50%;
    width: 17px;
    height: 17px;
    color: #6b7590;
    pointer-events: none;
}

.contact-modal textarea.form-control {
    height: 118px;
    padding-bottom: 26px;
    resize: none;
}

.contact-modal .cm-counter {
    position: absolute;
    right: 12px;
    bottom: 9px;
    color: #a3abbd;
    font-size: 11px;
    pointer-events: none;
}

/* ---------- Phone (intl-tel-input) ---------- */

.contact-modal .mobile-section {
    width: 100%;
}

.contact-modal .iti {
    width: 100%;
}

.contact-modal .iti--separate-dial-code .form-control {
    padding-left: 86px;
}

.contact-modal .iti--separate-dial-code .iti__selected-flag {
    padding-left: 12px;
    border-radius: 9px 0 0 9px;
    background: #f4f6fa;
}

.contact-modal .iti__selected-dial-code {
    color: #0d1530;
    font-size: 14px;
}

.contact-modal .iti__arrow {
    border-top-color: #6b7590;
}

.contact-modal .iti__arrow--up {
    border-bottom-color: #6b7590;
}

/* ---------- Secure notice / captcha / submit ---------- */

.contact-modal .cm-secure {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 0;
    padding: 12px 14px;
    border: 1px solid #dbe6fb;
    border-radius: 9px;
    background: #eff5ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
}

.contact-modal .cm-secure svg {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
}

.contact-modal .cm-captcha {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-modal .btn-primary {
    width: 100%;
    padding: 15px 20px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    font-size: 16px;
    font-weight: 700;
}

.contact-modal .btn-primary:hover,
.contact-modal .btn-primary:active,
.contact-modal .btn-primary:focus {
    background: #1d4ed8;
}

.contact-modal .cm-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    color: #6b7590;
    font-size: 13px;
}

.contact-modal .cm-note svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* ---------- Validation ---------- */

.contact-modal .error {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

.contact-modal .form-control.is-invalid,
.contact-modal .form-select.is-invalid {
    border-color: #e5484d;
    background-image: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .contact-modal .cm-aside {
        padding: 28px 24px;
    }

    .contact-modal .cm-headline {
        font-size: 26px;
    }

    .contact-modal .cm-panel {
        padding: 28px 24px 26px;
    }
}

@media (max-width: 767px) {
    .contact-modal .modal-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .contact-modal .cm-panel {
        padding: 26px 18px 22px;
    }

    /* Keep the heading clear of the close button once the left pane is hidden
       and the header runs the full modal width. */
    .contact-modal .cm-panel-head {
        padding-right: 34px;
    }

    /* The paired fields go single-column before their labels start wrapping. */
    .contact-modal .cm-row {
        grid-template-columns: minmax(0, 1fr);
    }

    /* reCAPTCHA needs its full ~302px to render (a narrower box crops the
       badge). Scale the whole widget down to fit the panel instead. */
    .contact-modal .cm-captcha .g-recaptcha {
        transform: scale(.85);
        transform-origin: center;
    }
}
