/* =========================================================
   MORTGAGE CALCULATOR
========================================================= */

.mortgage-container {
    width: min(1200px, 90%);
    margin: 0 auto;
}


/* =========================================================
   HERO
========================================================= */

.mortgage-hero {
    position: relative;

    min-height: 520px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            rgba(17, 48, 82, 0.60),
            rgba(17, 48, 82, 0.60)
        ),
        url("../images/hero/mortgage-hero.jpg")
        center / cover no-repeat;

    text-align: center;
    color: #ffffff;
}

.mortgage-hero-overlay {
    position: absolute;
    inset: 0;

    background: rgba(15, 42, 72, 0.10);
}

.mortgage-hero-content {
    position: relative;
    z-index: 2;

    width: min(850px, 90%);
    margin: 0 auto;

    padding: 90px 0 70px;
}

.mortgage-hero .section-eyebrow {
    color: #d5a54a;
}

.mortgage-hero h1 {
    margin: 18px 0 22px;

    color: #ffffff;

    font-family: var(--heading-font);
    font-size: clamp(3.5rem, 6vw, 5.8rem);
    font-weight: 500;
    line-height: 0.98;
}

.mortgage-hero p {
    max-width: 680px;
    margin: 0 auto;

    color: rgba(255,255,255,0.92);

    font-size: 1.08rem;
    line-height: 1.8;
}


/* =========================================================
   MAIN SECTION
========================================================= */

.mortgage-section {
    padding: 105px 0 90px;

    background: #f5f7f9;
}

.mortgage-heading {
    max-width: 760px;

    margin: 0 auto 55px;

    text-align: center;
}

.mortgage-heading h2 {
    margin: 15px 0 18px;

    color: var(--text);

    font-family: var(--heading-font);
    font-size: clamp(2.8rem, 4.5vw, 4.2rem);
    font-weight: 500;
    line-height: 1.05;
}

.mortgage-heading p {
    margin: 0;

    color: var(--text-light);

    line-height: 1.8;
}


/* =========================================================
   CALCULATOR CARD
========================================================= */

.mortgage-calculator {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    background: #ffffff;

    border: 1px solid #e1e6eb;
    border-radius: 12px;

    box-shadow:
        0 20px 50px rgba(20, 45, 75, 0.08);

    overflow: hidden;
}


/* =========================================================
   INPUT SIDE
========================================================= */

.mortgage-inputs {
    padding: 50px;
}

.mortgage-inputs h3,
.payment-breakdown h3 {
    margin: 0 0 28px;

    color: var(--primary);

    font-family: var(--heading-font);
    font-size: 2rem;
    font-weight: 600;
}

.additional-heading {
    margin-top: 42px !important;
}


.mortgage-field {
    margin-bottom: 22px;
}

.mortgage-field label {
    display: flex;
    justify-content: space-between;

    margin-bottom: 8px;

    color: #303942;

    font-size: 0.88rem;
    font-weight: 600;
}

.mortgage-field label span {
    color: var(--text-light);

    font-size: 0.78rem;
    font-weight: 400;
}


.mortgage-field input,
.mortgage-field select {
    width: 100%;
    height: 50px;

    box-sizing: border-box;

    border: 1px solid #d9e0e6;
    border-radius: 6px;

    background: #ffffff;

    color: #303942;

    font-family: var(--body-font);
    font-size: 0.95rem;

    outline: none;

    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.mortgage-field input:focus,
.mortgage-field select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(30, 70, 120, 0.10);
}


.input-prefix,
.input-suffix {
    position: relative;
}

.input-prefix span {
    position: absolute;

    left: 15px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--text-light);

    pointer-events: none;
}

.input-prefix input {
    padding-left: 32px;
}


.input-suffix span {
    position: absolute;

    right: 15px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--text-light);

    pointer-events: none;
}

.input-suffix input {
    padding-right: 45px;
}


.down-payment-row {
    display: grid;

    grid-template-columns: 1fr 110px;

    gap: 10px;
}


/* =========================================================
   RESULTS SIDE
========================================================= */

.mortgage-results {
    padding: 50px;

    background: #f8fafb;

    border-left: 1px solid #e1e6eb;
}


.payment-summary {
    padding: 30px;

    background: var(--primary);

    border-radius: 9px;

    text-align: center;

    color: #ffffff;
}

.payment-label {
    display: block;

    margin-bottom: 8px;

    color: rgba(255,255,255,0.78);

    font-size: 0.85rem;
    font-weight: 600;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.payment-summary strong {
    display: block;

    color: #ffffff;

    font-family: var(--heading-font);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 600;
    line-height: 1;
}

.payment-note {
    display: block;

    margin-top: 12px;

    color: rgba(255,255,255,0.70);

    font-size: 0.78rem;
    line-height: 1.5;
}


.loan-summary {
    display: grid;

    grid-template-columns: 1fr 1fr;

    margin: 28px 0;

    padding: 22px 0;

    border-top: 1px solid #dde3e8;
    border-bottom: 1px solid #dde3e8;

    gap: 20px;
}

.loan-summary div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.loan-summary span {
    color: var(--text-light);

    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.loan-summary strong {
    color: var(--primary);

    font-size: 1.15rem;
}


.payment-breakdown h3 {
    margin-bottom: 18px;
}

.breakdown-row,
.breakdown-total {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 12px 0;

    color: var(--text-light);

    font-size: 0.9rem;
}

.breakdown-row strong {
    color: var(--text);
}

.breakdown-total {
    margin-top: 8px;

    padding-top: 18px;

    border-top: 1px solid #dce2e7;

    color: var(--primary);

    font-weight: 700;
}

.breakdown-total strong {
    color: var(--primary);

    font-size: 1.1rem;
}


.mortgage-contact {
    width: 100%;

    margin-top: 28px;

    box-sizing: border-box;
}


/* =========================================================
   DISCLAIMER
========================================================= */

.mortgage-disclaimer {
    max-width: 850px;

    margin: 28px auto 0;

    color: var(--text-light);

    font-size: 0.78rem;
    line-height: 1.7;

    text-align: center;
}


/* =========================================================
   CTA
========================================================= */

.mortgage-cta {
    padding: 90px 0;

    background: var(--primary);

    color: #ffffff;

    text-align: center;
}

.mortgage-cta .section-eyebrow {
    color: #d5a54a;
}

.mortgage-cta h2 {
    margin: 15px 0 20px;

    color: #ffffff;

    font-family: var(--heading-font);
    font-size: clamp(3rem, 5vw, 4.8rem);
    font-weight: 500;
    line-height: 1;
}

.mortgage-cta p {
    max-width: 650px;

    margin: 0 auto 30px;

    color: rgba(255,255,255,0.84);

    line-height: 1.8;
}

.mortgage-cta-buttons {
    display: flex;

    justify-content: center;

    gap: 15px;
}

.mortgage-cta .btn-secondary {
    border: 1px solid rgba(255,255,255,0.8);

    color: #ffffff;
    background: transparent;
}

.mortgage-cta .btn-secondary:hover {
    background: #ffffff;
    color: var(--primary);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 850px) {

    .mortgage-calculator {
        grid-template-columns: 1fr;
    }

    .mortgage-results {
        border-left: none;
        border-top: 1px solid #e1e6eb;
    }

}


@media (max-width: 600px) {

    .mortgage-hero {
        min-height: 480px;
    }

    .mortgage-hero-content {
        padding: 70px 0 55px;
    }

    .mortgage-hero h1 {
        font-size: 3rem;
    }

    .mortgage-section {
        padding: 75px 0;
    }

    .mortgage-inputs,
    .mortgage-results {
        padding: 30px 22px;
    }

    .down-payment-row {
        grid-template-columns: 1fr;
    }

    .loan-summary {
        grid-template-columns: 1fr;
    }

    .mortgage-cta {
        padding: 70px 0;
    }

    .mortgage-cta-buttons {
        flex-direction: column;

        align-items: center;
    }

    .mortgage-cta-buttons a {
        width: 100%;
        max-width: 280px;

        box-sizing: border-box;
    }

}