/* =========================================================
   Loan simulation page
   Aligned with property-estimation style
   ========================================================= */

.loan-page {
    background: #fbfcfb;
    color: #111111;
    overflow: hidden;
    font-family: var(--font-main);
    font-size: var(--fs-body);
}

.loan-page *,
.loan-page *::before,
.loan-page *::after {
    box-sizing: border-box;
}

.loan-page a {
    text-decoration: none;
}

.loan-container {
    width: min(1220px, calc(100% - 40px));
    margin-inline: auto;
}

/* =========================================================
   Shared elements
   ========================================================= */

.loan-kicker {
    margin: 0 0 12px;
    color: #018d71;
    font-family: var(--font-accent);
    font-size: var(--fs-small);
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.loan-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 780px;
    margin: 0 auto 30px;
    text-align: center;
}

.loan-section-head p:not(.loan-kicker) {
    max-width: 740px;
    margin: 0 auto;
    color: rgba(17, 17, 17, 0.64);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.7;
    text-align: center;
}

/* =========================================================
   Hero
   ========================================================= */

.loan-hero {
    padding: 24px 0;
    background: #fbfcfb;
}

.loan-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
    align-items: stretch;
}

.loan-hero-content {
    position: relative;
    overflow: hidden;
    padding: clamp(20px, 2vw, 28px);
    border: 1px solid rgba(1, 141, 113, 0.16);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(1, 141, 113, 0.045);
}

.loan-hero-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24px;
    width: 3px;
    height: 76px;
    background: #018d71;
}

.loan-hero-content h1 {
    margin: 0;
    color: #111111;
    font-family: var(--font-main);
    font-size: var(--fs-title);
    line-height: 0.97;
    font-weight: 500;
    letter-spacing: -0.065em;
}

.loan-hero-content h1 span {
    color: #018d71;
}

.loan-hero-content p:not(.loan-kicker) {
    max-width: 780px;
    margin: 12px 0 0;
    color: rgba(17, 17, 17, 0.66);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.74;
}

.loan-hero-aside {
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    border: 1px solid rgba(1, 141, 113, 0.28);
    border-radius: 10px;
    background: #018d71;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(1, 141, 113, 0.12);
}

.loan-hero-aside::before {
    content: "";
    flex-shrink: 0;
    margin-bottom: 12px;
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: #feef10;
}

.loan-hero-aside span {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-accent);
    font-size: var(--fs-small);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.loan-hero-aside strong {
    display: block;
    margin: 0 0 10px;
    color: #ffffff;
    font-family: var(--font-accent);
    font-size: var(--fs-subtitle);
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: -0.05em;
}

.loan-hero-aside p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.66;
}

/* =========================================================
   Main section
   ========================================================= */

.loan-section {
    padding: 54px 0;
    background: #ffffff;
    border-top: 1px solid rgba(17, 17, 17, 0.055);
    border-bottom: 1px solid rgba(17, 17, 17, 0.055);
}

.loan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
    gap: 20px;
    align-items: start;
}

.loan-form-card,
.loan-result-card,
.loan-result-placeholder,
.loan-info-card,
.loan-seo-card {
    border: 1px solid rgba(1, 141, 113, 0.16);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(1, 141, 113, 0.045);
}

.loan-form-card {
    padding: clamp(24px, 3vw, 34px);
}

.loan-form-card .loan-section-head {
    align-items: flex-start;
    max-width: none;
    margin: 0 0 28px;
    text-align: left;
}

.loan-form-card .loan-section-head h2 {
    margin: 0;
    color: #111111;
    font-family: var(--font-main);
    font-size: var(--fs-title);
    line-height: 1.04;
    font-weight: 500;
    letter-spacing: -0.055em;
}

.loan-form-card .loan-section-head h2 span {
    color: #018d71;
}

.loan-form-card .loan-section-head h2::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin: 18px 0 20px;
    border-radius: 3px;
    background: #feef10;
}

.loan-form-card .loan-section-head p:not(.loan-kicker) {
    max-width: 780px;
    margin: 0;
    color: rgba(17, 17, 17, 0.66);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.74;
    text-align: left;
}

/* =========================================================
   Form
   ========================================================= */

.loan-form {
    width: 100%;
    margin: 0;
}

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

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

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

.loan-field label {
    display: block;
    margin: 0 0 7px;
    color: #111111;
    font-family: var(--font-main);
    font-size: var(--fs-small);
    line-height: 1.2;
    font-weight: 600;
}

.loan-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    border: 1px solid rgba(1, 141, 113, 0.22);
    border-radius: 8px;
    background: #ffffff;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.loan-input-wrap:hover {
    border-color: rgba(184, 50, 95, 0.30);
}

.loan-input-wrap:focus-within {
    border-color: #018d71;
    box-shadow: 0 0 0 3px rgba(61, 199, 171, 0.12);
}

.loan-input-wrap input,
.loan-input-wrap select {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px;
    border: 0 !important;
    border-radius: 8px;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #111111;
    font-family: var(--font-main);
    font-size: var(--fs-small);
    line-height: 1.25;
}

.loan-input-wrap input {
    padding-right: 44px;
}

.loan-input-wrap select {
    cursor: pointer;
}

.loan-input-wrap span {
    position: absolute;
    right: 13px;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    color: rgba(17, 17, 17, 0.50);
    font-family: var(--font-accent);
    font-size: var(--fs-small);
    line-height: 1;
    pointer-events: none;
}

.loan-input-wrap input[type="number"]::-webkit-outer-spin-button,
.loan-input-wrap input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.loan-input-wrap input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.loan-field-errors,
.loan-form-errors {
    color: #b8325f;
    font-family: var(--font-main);
    font-size: var(--fs-small);
    font-weight: 600;
}

.loan-field-errors {
    margin-top: 7px;
}

.loan-field-errors ul,
.loan-form-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.loan-form-errors {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(184, 50, 95, 0.18);
    border-radius: 10px;
    background: rgba(184, 50, 95, 0.055);
}

.loan-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    margin-top: 20px;
    padding: 12px 24px;
    border: 1px solid #b8325f;
    border-radius: 8px;
    background: #b8325f;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: var(--fs-small);
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.loan-submit-btn:hover,
.loan-submit-btn:focus {
    background: #9f294f;
    border-color: #9f294f;
    transform: translateY(-1px);
}

/* =========================================================
   Duration slider
   ========================================================= */

.loan-duration-field {
    padding: 20px;
    border: 1px solid rgba(1, 141, 113, 0.14);
    border-radius: 10px;
    background: #fbfcfb;
}

.loan-duration-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.loan-duration-head label {
    margin: 0;
}

.loan-duration-value {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(61, 199, 171, 0.12);
    color: #018d71;
    font-family: var(--font-main);
    font-size: var(--fs-small);
    line-height: 1;
    font-weight: 600;
}

.loan-duration-value strong {
    color: #018d71;
    font-family: var(--font-accent);
    font-size: var(--fs-body);
    line-height: 1;
}

.loan-duration-slider-wrap {
    width: 100%;
}

.loan-duration-slider {
    --loan-duration-progress: 60%;

    width: 100%;
    height: 26px;
    margin: 0;
    padding: 0;

    border: 0;
    outline: 0;
    background: transparent;

    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.loan-duration-slider:focus {
    outline: none;
}

.loan-duration-slider::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            #018d71 0%,
            #3dc7ab var(--loan-duration-progress),
            rgba(1, 141, 113, 0.14) var(--loan-duration-progress),
            rgba(1, 141, 113, 0.14) 100%
        );
}

.loan-duration-slider::-moz-range-track {
    height: 5px;
    border-radius: 999px;
    background: rgba(1, 141, 113, 0.14);
}

.loan-duration-slider::-moz-range-progress {
    height: 5px;
    border-radius: 999px;
    background: #018d71;
}

.loan-duration-slider::-webkit-slider-thumb {
    width: 19px;
    height: 19px;
    margin-top: -7px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #018d71;
    box-shadow: 0 5px 14px rgba(1, 141, 113, 0.30);
    appearance: none;
    -webkit-appearance: none;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.loan-duration-slider::-webkit-slider-thumb:hover {
    transform: scale(1.08);
    background: #027b64;
    box-shadow: 0 7px 18px rgba(1, 141, 113, 0.36);
}

.loan-duration-slider::-moz-range-thumb {
    width: 19px;
    height: 19px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #018d71;
    box-shadow: 0 5px 14px rgba(1, 141, 113, 0.30);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.loan-duration-slider::-moz-range-thumb:hover {
    transform: scale(1.08);
    background: #027b64;
    box-shadow: 0 7px 18px rgba(1, 141, 113, 0.36);
}

.loan-duration-steps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.loan-duration-steps span {
    color: rgba(17, 17, 17, 0.52);
    font-family: var(--font-main);
    font-size: var(--fs-small);
    line-height: 1.2;
    white-space: nowrap;
}

.loan-duration-hidden {
    display: none;
}

/* =========================================================
   Results area
   ========================================================= */

.loan-result-area {
    display: grid;
    gap: 16px;
}

.loan-result-card {
    overflow: hidden;
}

.loan-result-main {
    position: relative;
    padding: 28px;
    background: #018d71;
    color: #ffffff;
}

.loan-result-main::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 28px;
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: #feef10;
}

.loan-result-main span {
    display: block;
    margin: 52px 0 14px;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-accent);
    font-size: var(--fs-small);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.loan-result-main strong {
    display: block;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: var(--fs-title);
    line-height: 0.92;
    font-weight: 500;
    letter-spacing: -0.065em;
}

.loan-result-main p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.55;
}

.loan-result-details {
    display: grid;
    grid-template-columns: 1fr;
}

.loan-result-details div {
    padding: 18px 20px;
    background: #ffffff;
    border-top: 1px solid rgba(1, 141, 113, 0.12);
}

.loan-result-details span {
    display: block;
    margin: 0 0 8px;
    color: rgba(17, 17, 17, 0.58);
    font-family: var(--font-main);
    font-size: var(--fs-small);
    line-height: 1.4;
}

.loan-result-details strong {
    display: block;
    color: #111111;
    font-family: var(--font-accent);
    font-size: var(--fs-subtitle);
    line-height: 1.1;
}

/* =========================================================
   Placeholder / info cards
   ========================================================= */

.loan-result-placeholder,
.loan-info-card {
    padding: 24px;
}

.loan-result-placeholder {
    position: relative;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #018d71;
    color: #ffffff;
}

.loan-result-placeholder::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 24px;
    width: 52px;
    height: 3px;
    border-radius: 3px;
    background: #feef10;
}

.loan-result-placeholder .loan-kicker {
    color: rgba(255, 255, 255, 0.82);
}

.loan-result-placeholder h2 {
    margin: 0;
    color: #ffffff;
    font-family: var(--font-accent);
    font-size: var(--fs-subtitle);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.045em;
}

.loan-result-placeholder p:not(.loan-kicker) {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.66;
}

.loan-info-card {
    background: #fbfcfb;
}

.loan-info-card h3 {
    margin: 0 0 14px;
    color: #111111;
    font-family: var(--font-accent);
    font-size: var(--fs-subtitle);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.loan-info-card p:not(.loan-kicker) {
    margin: 0;
    color: rgba(17, 17, 17, 0.64);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.66;
}

/* =========================================================
   SEO section
   ========================================================= */

.loan-seo-section {
    padding: 52px 0;
    background: #fbfcfb;
}

.loan-seo-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.5fr) minmax(0, 1fr);
    gap: 28px;
    padding: clamp(24px, 3vw, 34px);
}

.loan-seo-card h2 {
    margin: 0;
    color: #111111;
    font-family: var(--font-main);
    font-size: var(--fs-title);
    line-height: 1.06;
    font-weight: 500;
    letter-spacing: -0.045em;
}

.loan-seo-card h2 span {
    color: #018d71;
}

.loan-seo-card h2::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin: 18px 0 0;
    border-radius: 3px;
    background: #feef10;
}

.loan-seo-content {
    display: grid;
    gap: 14px;
}

.loan-seo-content p {
    margin: 0;
    color: rgba(17, 17, 17, 0.66);
    font-family: var(--font-main);
    font-size: var(--fs-body);
    line-height: 1.74;
}

/* =========================================================
   Responsive
   ========================================================= */

/* =========================
   RESPONSIVE
========================= */

@media (min-width: 641px) and (max-width: 1200px) {
.loan-hero-card,
    .loan-layout {
        grid-template-columns: 1fr;
    }

    .loan-result-details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

.loan-container {
        width: calc(100% - 24px);
    }

    .loan-section,
    .loan-seo-section {
        padding: 44px 0;
    }

    .loan-seo-card {
        grid-template-columns: 1fr;
    }

.loan-form-grid,
    .loan-result-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
.loan-hero-card,
    .loan-layout {
        grid-template-columns: 1fr;
    }

    .loan-result-details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

.loan-container {
        width: calc(100% - 24px);
    }

    .loan-section,
    .loan-seo-section {
        padding: 44px 0;
    }

    .loan-seo-card {
        grid-template-columns: 1fr;
    }

.loan-form-grid,
    .loan-result-details {
        grid-template-columns: 1fr;
    }

.loan-container {
        width: calc(100% - 16px);
    }

    .loan-hero {
        padding: 16px 0;
    }

    .loan-hero-content,
    .loan-hero-aside {
        padding: 20px;
    }

    .loan-hero-content::before {
        top: 24px;
        height: 58px;
    }

    .loan-form-card,
    .loan-result-placeholder,
    .loan-info-card,
    .loan-seo-card {
        padding: 22px;
    }

    .loan-duration-field {
        padding: 18px;
    }

    .loan-duration-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .loan-result-main {
        padding: 24px;
    }

    .loan-result-main::before {
        left: 24px;
    }
}
