.mortgage-hero {
    position: relative;
    min-height: clamp(320px, 39vw, 560px);
    overflow: hidden;
    background-color: #040404;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.7)),
        url("https://binghattiweb.imgix.net/mortgage-banner.webp");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mortgage-hero__inner {
    position: relative;
    z-index: 1;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: clamp(130px, 16vw, 180px) 0 clamp(72px, 9vw, 120px); */
    text-align: center;
}

.mortgage-hero__title {
    margin: 0;
    width: 100%;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: 4.4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34em;
    flex-wrap: wrap;
}

.mortgage-hero__title-strong {
    font-weight: 400;
}

.mortgage-hero__title-light {
    font-weight: 200;
    opacity: 0.9;
}

.mortgage-text {
    background: #020202;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0 20px;
}

.mortgage-text h2{
    font-size: 38px;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
}

.mortgage-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.55;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.mortgage-calculator-section {
    background: #020202;
    padding: 28px 0 76px;
}

.mortgage-calculator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.86fr);
    gap: 82px;
    align-items: start;
    padding: 0px 40px;
}

.mortgage-calculator-panel {
    min-width: 0;
}

.mortgage-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.mortgage-calculator-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    margin-bottom: 10px;
}

.mortgage-calculator-label {
    display: inline-block;
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
}

.mortgage-calculator-label span {
    color: #ff5a5a;
}

.mortgage-status-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mortgage-status-button {
    min-width: 118px;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 7px;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mortgage-status-button.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

.mortgage-form-group {
    display: flex;
    flex-direction: column;
}

.mortgage-input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    overflow: hidden;
    background: transparent;
}

.mortgage-slider-control {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mortgage-input-wrap--slider {
    min-height: 65px;
}

.mortgage-slider-display {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0 22px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    outline: none;
}

.mortgage-slider-input {
    width: 100%;
    height: 24px;
    margin: -21px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    --slider-progress: 0%;
}

.mortgage-slider-input:focus {
    outline: none;
}

.mortgage-slider-input::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 0;
    background: linear-gradient(90deg, #cfcfcf 0%, #cfcfcf var(--slider-progress), rgba(255, 255, 255, 0.28) var(--slider-progress), rgba(255, 255, 255, 0.28) 100%);
}

.mortgage-slider-input::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    margin-top: -8px;
    border: 0;
    border-radius: 50%;
    background: #d9d9d9;
    -webkit-appearance: none;
}

.mortgage-slider-input::-moz-range-track {
    height: 8px;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.28);
}

.mortgage-slider-input::-moz-range-progress {
    height: 8px;
    border-radius: 0;
    background: #cfcfcf;
}

.mortgage-slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: #d9d9d9;
}

.mortgage-slider-range {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: -1px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    line-height: 1.2;
}

.mortgage-calculator-input {
    width: 100%;
    height: 54px;
    padding: 0 22px;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size:16px;
    font-weight: 275;
    outline: none;
}

.mortgage-calculator-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.mortgage-input-suffix {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mortgage-summary-title {
    margin: 7px 0 25px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
}

.mortgage-summary-metrics {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px 40px;
    align-items: start;
}

.mortgage-summary-metric {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.mortgage-summary-label {
    color: rgba(255, 255, 255, 0.92);
    font-size:18px;
    line-height: 1.4;
    font-weight: 400;
}

.mortgage-summary-value {
    color: #ffffff;
    font-size: 32px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.mortgage-summary-metric--rate .mortgage-summary-value {
    font-size: 32px;
    letter-spacing: -0.01em;
}

.mortgage-eligibility-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 40px;
}

.mortgage-eligibility-form .mortgage-calculator-label {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
}

.mortgage-input-wrap--full {
    grid-template-columns: minmax(0, 1fr);
    min-height: 40px;
    border-color: rgba(255, 255, 255, 0.52);
    border-radius: 6px;
    background: #3f3f3f;
}

.mortgage-phone-wrap {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: stretch;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 6px;
    overflow: hidden;
    background: #3f3f3f;
}

.mortgage-country-code-select,
.mortgage-phone-input {
    height: 40px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-family: inherit;
    font-size: 14px;
    font-weight: 275;
    outline: none;
}

.mortgage-country-code-select {
    width: 100%;
    padding: 0 24px;
    padding-right: 26px;
    border-right: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: calc(100% - 14px) center;
    background-size: 10px 6px;
    background-repeat: no-repeat;
    color-scheme: dark;
}

.mortgage-country-code-select::-ms-expand {
    display: none;
}

.mortgage-country-code-select option {
    background: #000000;
    color: #ffffff;
}

.mortgage-phone-input {
    width: 100%;
    padding: 0 18px 0 4px;
}

.mortgage-phone-input::-webkit-inner-spin-button,
.mortgage-phone-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mortgage-input-wrap--full .mortgage-calculator-input {
    height: 40px;
    padding: 0 26px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.86);
}

.mortgage-input-wrap--full .mortgage-calculator-input::placeholder,
.mortgage-phone-input::placeholder {
    color: rgba(255, 255, 255, 0.68);
    font-weight: 275;
}

.mortgage-field-error {
    margin-top: 8px;
    color: #ff5a5a;
    font-size: 12px;
    line-height: 1.35;
}

.mortgage-eligibility-status {
    min-height: 20px;
    font-size: 13px;
    line-height: 1.4;
}

.mortgage-eligibility-status.is-success {
    color: #9be38b;
}

.mortgage-eligibility-status.is-error {
    color: #ff7a7a;
}

.mortgage-eligibility-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(342px, 100%);
    min-height: 52px;
    /* margin-top: 14px; */
    padding: 14px 0px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.04) 18%, rgba(20, 20, 20, 0.96) 52%, rgba(255, 255, 255, 0.1) 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 14%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, 0.02) 86%, rgba(255, 255, 255, 0.12) 100%);
    box-shadow: inset 0 1px 10px rgba(255, 255, 255, 0.1), inset 0 -6px 12px rgba(255, 255, 255, 0.05);
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 13px;
    line-height: 1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    margin: 0 auto;
}

.mortgage-eligibility-button:hover,
.mortgage-eligibility-button:focus-visible {
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.12), inset 0 -6px 14px rgba(255, 255, 255, 0.06);
}

.mortgage-eligibility-button:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

@media (max-width: 991px) {
    .mortgage-hero {
        min-height: clamp(300px, 54vw, 460px);
        background-position: center top;
    }

    .mortgage-hero__title {
        letter-spacing: 0.2em;
        gap: 0.28em;
    }

    .mortgage-text {
        padding: 22px 0 18px;
    }

    .mortgage-text h2{
        font-size: 30px;
        letter-spacing: 3.3px;
    } 

    .mortgage-text p {
        max-width: 100%;
        font-size: 15px;
        line-height: 1.6;
    }

    .mortgage-calculator-section {
        padding: 24px 0 64px;
    }

    .mortgage-calculator-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 0px 30px;
    }

    .mortgage-summary-title {
        margin-top: 0;
    }

    .mortgage-summary-cta {
        margin-top: 54px;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .mortgage-hero {
        min-height: 300px;
        background-position: 54% center;
    }

    .mortgage-hero__title {
        font-size: 30px;
        letter-spacing: 3.3;
        gap: 0.22em;
    }

    .mortgage-text {
        padding: 18px 0 16px;
    }

    .mortgage-text h2{
        font-size: 25px;
        letter-spacing: 2.7px;
    } 

    .mortgage-text p {
        font-size: 14px;
        line-height: 1.65;
    }

    .mortgage-calculator-section {
        padding: 20px 0 52px;
    }

    .mortgage-calculator-form {
        gap: 22px;
    }

    .mortgage-calculator-label {
        margin-bottom: 12px;
        font-size: 14px;
    }

    .mortgage-status-toggle {
        gap: 8px;
    }

    .mortgage-status-button {
        flex: 1 1 150px;
        min-width: 0;
        padding: 13px 16px;
        font-size: 14px;
    }

    .mortgage-input-wrap {
        grid-template-columns: minmax(0, 1fr) 60px;
    }

    .mortgage-input-wrap--slider {
        min-height: 60px;
    }

    .mortgage-slider-display {
        padding: 0 16px;
        font-size: 14px;
    }

    .mortgage-slider-input {
        height: 20px;
        margin: -18px 0px 0px;
    }

    .mortgage-slider-input::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
        margin-top: -7px;
    }

    .mortgage-slider-input::-moz-range-thumb {
        width: 22px;
        height: 22px;
    }

    .mortgage-slider-range {
        font-size: 12px;
    }

    .mortgage-calculator-input {
        height: 50px;
        padding: 0 16px;
        font-size: 14px;
    }

    .mortgage-input-suffix {
        font-size: 14px;
    }

    .mortgage-country-code-select,
    .mortgage-phone-input {
        height: 50px;
        font-size: 14px;
    }

    .mortgage-country-code-select {
        padding-left: 20px;
        padding-right: 26px;
    }

    .mortgage-phone-input {
        padding: 0 14px 0 4px;
    }

    .mortgage-input-wrap--full .mortgage-calculator-input {
        padding: 0 20px;
        font-size: 14px;
    }

    .mortgage-summary-metrics {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .mortgage-summary-title {
        margin-bottom: 24px;
        font-size: 16px;
    }

    .mortgage-summary-value,
    .mortgage-summary-metric--rate .mortgage-summary-value {
        font-size: 25px;
    }

    .mortgage-summary-cta {
        margin-top: 40px;
    }

    .mortgage-summary-cta h3 {
        margin-bottom: 22px;
        font-size: 25px;
    }

    .mortgage-eligibility-button {
        min-height: 50px;
        padding: 12px 18px;
        letter-spacing: 0.22em;
        font-size: 12px;
        width: 100%;
    }

    .mortgage-field-error,
    .mortgage-eligibility-status {
        font-size: 11px;
    }

    .mortgage-calculator-grid {
        padding: 0px 25px;
    }

    .mortgage-eligibility-form{
        gap: 15px;
    }
}

@media (max-width: 479px) {
    .mortgage-hero {
        min-height: 270px;
    }

    .mortgage-hero__title {
        max-width: 100%;
        line-height: 1.25;
        font-size: 25px;
        letter-spacing: 2.5px;
    }

    .mortgage-text h2{
        font-size: 20px;
        letter-spacing: 2.2px;
    } 

    .mortgage-text p {
        font-size: 12px;
        line-height: 1.6;
    }

    .mortgage-calculator-section {
        padding-bottom: 44px;
    }

    .mortgage-status-button {
        flex-basis: 100%;
        font-size: 12px;
    }

    .mortgage-summary-title {
        font-size: 14px;
    }

    .mortgage-summary-label {
        font-size: 14px;
    }

    .mortgage-summary-value,
    .mortgage-summary-metric--rate .mortgage-summary-value {
        font-size: 20px;
    }

    .mortgage-summary-cta h3 {
        font-size: 20px;
    }

    .mortgage-calculator-grid {
        padding: 0px 20px;
    }
}
