/* ========================================================================
   How To Buy Page Styles
   ======================================================================== */

/* --- Hero Section --- */
.htb-hero {
    padding: 40px 0 80px;
    margin-top: 100px;
}

.htb-hero-row {
    align-items: flex-start;
}

.htb-hero-copy {
    padding-top: 20px;
}

.htb-hero-copy h1 {
    color: #182f22;
    margin-bottom: 14px;
}

.htb-hero-copy .text-style-body {
    color: #2f3532;
    margin-bottom: 14px;
}

.htb-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.htb-benefits-list li {
    position: relative;
    padding-left: 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: #2f3532;
    margin-bottom: 14px;
}

.htb-benefits-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #6CB55F;
}

/* --- Form Card --- */
.htb-form-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: #eef2f0;
    border: 1.5px solid rgba(0, 0, 0, 0.14);
    border-radius: 24px;
    padding: 24px;
}

.htb-form-card h3 {
    display: none;
}

.htb-form-root:empty {
    min-height: 427px;
}

.htb-form-root .hs-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin: 0;
}

.htb-form-root .hs-form-field {
    margin-bottom: 0;
}

.htb-form-root .hs-form fieldset {
    display: contents;
    max-width: 100%;
}

.htb-form-root .hs-form .hs-form-field.ls-hs-field-full,
.htb-form-root .hs-form .hs_submit {
    grid-column: 1 / -1;
}

.htb-form-root .hs-form .hs-form-field.ls-hs-field-half {
    grid-column: auto;
}

.htb-form-root .hs-form .hs-form-field.ls-hs-field-hidden {
    display: none;
}

.htb-form-root .hs-form .hs-form-field > label,
.htb-form-root .hs-form fieldset > legend {
    display: none;
}

.htb-form-root .hs-form .input input,
.htb-form-root .hs-form .input select,
.htb-form-root .hs-form .input textarea {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 11px;
    border: 2px solid #d3d3d3;
    border-radius: 10px;
    background: #ffffff;
    color: #2f3532;
    font-size: 16px;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    line-height: 1.55;
    box-shadow: none;
    outline: none;
}

.htb-form-root .hs-form .input input:focus,
.htb-form-root .hs-form .input select:focus,
.htb-form-root .hs-form .input textarea:focus {
    border-color: #6CB55F;
}

.htb-form-root .hs-form .input select {
    appearance: none;
    padding-right: 38px;
    color: #afafaf;
    background-color: #ffffff;
    background-image: linear-gradient(45deg, transparent 50%, #afafaf 50%), linear-gradient(135deg, #afafaf 50%, transparent 50%);
    background-position: calc(100% - 23px) 20px, calc(100% - 16px) 20px;
    background-repeat: no-repeat;
    background-size: 7px 7px, 7px 7px;
}

.htb-form-root .hs-form .input select.ls-hs-select-has-value {
    color: #2f3532;
}

.htb-form-root .hs-form .input textarea {
    min-height: 48px;
    resize: none;
    overflow: hidden;
}

.htb-form-root .hs-form .ls-hs-field-textarea-large .input textarea {
    height: 119px;
    min-height: 119px;
    padding-top: 12px;
    resize: none;
    overflow: auto;
}

.htb-form-root .hs-form .input input::placeholder,
.htb-form-root .hs-form .input select::placeholder,
.htb-form-root .hs-form .input textarea::placeholder {
    color: #afafaf;
    opacity: 1;
}

.htb-form-root .hs-form .hs_submit {
    margin-top: 8px;
}

.htb-form-root .hs-form .hs-button,
.htb-form-root .hs-form input[type="submit"] {
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 24px;
    border: 3px solid #df585d;
    border-radius: 444px;
    background: linear-gradient(90deg, #9d2103 0%, #ca2c06 100%);
    box-sizing: border-box;
    color: #ffffff;
    font-size: 16px;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    line-height: 1.45;
    cursor: pointer;
}

.htb-form-root .hs-form .hs-button:hover,
.htb-form-root .hs-form .hs-button:focus,
.htb-form-root .hs-form input[type="submit"]:hover,
.htb-form-root .hs-form input[type="submit"]:focus {
    background: linear-gradient(90deg, #8f1d03 0%, #b92807 100%);
    border-color: #d84f52;
    color: #ffffff;
}

.htb-form-root .hs-error-msgs,
.htb-form-root .submitted-message {
    margin: 8px 0 0;
    padding-left: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.45;
}

/* Consultation meta below form */
.htb-consultation-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.htb-consultation-reassurance {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    margin: 0;
    color: #04170d;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

.htb-consultation-reassurance span {
    white-space: nowrap;
}

.htb-consultation-reassurance b {
    margin-right: 4px;
    color: #6cb55f;
    font-weight: 700;
}

.htb-consultation-divider {
    margin: 0;
    color: #04170d;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.htb-btn-call {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #9d2103;
    border-radius: 444px;
    color: #9d2103;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    background: transparent;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.htb-btn-call img {
    width: 18px;
    height: 18px;
    margin-right: 9px;
}

.htb-btn-call:hover,
.htb-btn-call:focus {
    background: #9d2103;
    color: #fff;
}

/* --- Benefits Cards Section --- */
.htb-cards-section {
    padding: 0 0 80px;
}

.htb-benefit-card {
    background: #eef2f0;
    border: 2px solid rgba(0, 0, 0, 0.14);
    border-radius: 32px;
    padding: 12px;
    padding-bottom: 36px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.htb-benefit-card-image {
    width: 100%;
    height: 307px;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 32px;
}

.htb-benefit-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.htb-benefit-card-body {
    padding: 0 12px;
}

.htb-benefit-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: #182f22;
    margin-bottom: 12px;
}

.htb-benefit-card-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: #2f3532;
    margin: 0;
}

/* --- Financing Section --- */
.htb-financing-section {
    padding: 0 0 80px;
}

.htb-financing-card {
    background: linear-gradient(221deg, #407E43 24%, #182f22 81%);
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 72px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 45px;
    overflow: hidden;
    min-height: 608px;
    position: relative;
}

.htb-financing-content {
    position: relative;
    z-index: 2;
    padding: 77px 56px;
    max-width: 520px;
}

.htb-financing-content h2 {
    color: #fff;
    margin-bottom: 32px;
}

.htb-financing-content .text-style-body {
    color: #fff;
    margin-bottom: 24px;
    max-width: 349px;
}

.htb-financing-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.htb-btn-white-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border: 3px solid #fff;
    border-radius: 444px;
    background: transparent;
    text-decoration: none;
    padding: 11px 24px;
    transition: background-color 0.2s, color 0.2s;
}

.htb-btn-white-outline:hover {
    background: #fff;
    color: #182f22;
}

.htb-financing-image {
    flex-shrink: 0;
    width: 673px;
    height: 100%;
    border-radius: 52px;
    overflow: hidden;
    position: absolute;
    right: 13px;
    top: 13px;
    bottom: 13px;
}

.htb-financing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Comparison Table Section --- */
.htb-compare-section {
    padding: 0 0 80px;
}

.htb-compare-header {
    margin-bottom: 24px;
}

.htb-compare-header h2 {
    color: #182f22;
    margin-bottom: 12px;
}

.htb-table-wrapper {
    background: #eef2f0;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 32px;
    padding: 12px;
    max-width: 807px;
    margin: 0 auto;
    overflow: hidden;
}

.htb-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 24px;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.htb-compare-table thead th {
    height: 60px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 800;
    line-height: 18px;
    color: #fafafa;
    text-align: center;
    border-bottom: 1px solid #fafafa;
}

.htb-th-feature {
    background: #27513c;
    text-align: left !important;
    width: 285px;
}

.htb-th-lifesource {
    background: #6CB55F;
    width: 166px;
}

.htb-th-competitor {
    background: #D71920;
    width: 166px;
}

.htb-compare-table tbody td {
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #101828;
    border-bottom: 1px solid #fafafa;
    background: #fafafa;
    height: 52px;
}

.htb-compare-table tbody tr:nth-child(even) td {
    background: #eef2f0;
}

.htb-compare-table tbody td:first-child {
    text-align: left;
}

.htb-td-check,
.htb-td-x {
    text-align: center;
    vertical-align: middle;
    line-height: 0;
}

.htb-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* --- In-Home Service Section --- */
.htb-service-section {
    padding: 0 0 80px;
}

.htb-service-card {
    background: linear-gradient(47deg, #9d2103 12%, #ca2c06 105%);
    border-radius: 64px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 52px;
    overflow: hidden;
    height: 608px;
    position: relative;
}

.htb-service-content {
    position: absolute;
    z-index: 2;
    left: 70px;
    top: 187px;
    max-width: 520px;
}

.htb-service-content h2 {
    font-size: 42px;
    color: #fff;
    margin-bottom: 24px;
    max-width: 386px;
}

.htb-service-content .text-style-body {
    color: #fff;
    margin-bottom: 32px;
    max-width: 386px;
}

.htb-service-content .htb-btn-white-outline {
    height: 52px;
    border-width: 3px;
}

.htb-service-image {
    position: absolute;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: 733px;
    border-radius: 52px;
    overflow: hidden;
}

.htb-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================================================
   Responsive
   ======================================================================== */

/* --- Mid-screen breakpoint: prevent text/image overlap --- */
@media (max-width: 1279.98px) and (min-width: 992px) {
    .htb-financing-card {
        min-height: auto;
        height: auto;
        padding: 40px;
        border-radius: 48px;
    }

    .htb-financing-content {
        padding: 0;
        max-width: 50%;
    }

    .htb-financing-image {
        width: 50%;
        right: 13px;
    }

    .htb-service-card {
        height: auto;
        min-height: 480px;
        padding: 40px;
        border-radius: 48px;
    }

    .htb-service-content {
        left: 40px;
        top: 80px;
        max-width: 45%;
    }

    .htb-service-content h2 {
        font-size: 36px;
    }

    .htb-service-image {
        width: 50%;
        right: 12px;
    }
}

@media (max-width: 991.98px) {
    .htb-hero {
        padding: 32px 0 64px;
    }

    .htb-hero-copy {
        padding-top: 0;
        margin-bottom: 32px;
    }

    .htb-financing-card {
        flex-direction: column;
        border-radius: 32px;
        padding: 24px;
        min-height: auto;
        gap: 24px;
    }

    .htb-financing-content {
        padding: 0;
        max-width: 100%;
    }

    .htb-financing-content .text-style-body {
        max-width: 100%;
    }

    .htb-financing-image {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        height: 350px;
        border-radius: 24px;
    }

    .htb-service-card {
        flex-direction: column;
        border-radius: 32px;
        padding: 24px;
        height: auto;
        gap: 24px;
    }

    .htb-service-content {
        position: relative;
        left: auto;
        top: auto;
        max-width: 100%;
    }

    .htb-service-content h2 {
        font-size: 32px;
        max-width: 100%;
    }

    .htb-service-image {
        position: relative;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        height: 350px;
        border-radius: 24px;
    }

    .htb-table-wrapper {
        overflow-x: auto;
    }

    .htb-compare-table {
        min-width: 700px;
    }
}

@media (max-width: 767.98px) {
    .htb-hero {
        padding: 24px 0 48px;
    }

    .htb-cards-section,
    .htb-financing-section,
    .htb-compare-section,
    .htb-service-section {
        padding: 0 0 48px;
    }

    .htb-benefit-card {
        border-radius: 24px;
    }

    .htb-benefit-card-image {
        height: 220px;
        border-radius: 16px;
        margin-bottom: 24px;
    }

    .htb-financing-card {
        border-radius: 24px;
    }

    .htb-financing-image {
        height: 250px;
        border-radius: 16px;
    }

    .htb-service-card {
        border-radius: 24px;
    }

    .htb-service-content h2 {
        font-size: 28px;
    }

    .htb-service-image {
        height: 250px;
        border-radius: 16px;
    }

    .htb-form-card {
        border-radius: 16px;
        padding: 20px;
    }

    .htb-form-root .hs-form {
        grid-template-columns: 1fr;
    }

    .htb-form-root .hs-form .hs-form-field.ls-hs-field-half {
        grid-column: 1 / -1;
    }

    .htb-consultation-reassurance {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 13px;
    }
}


/* === HERO TOP-SPACING STANDARDIZATION (nav→hero gap matched to commercial Figma reference, 2026-06-16) === */
@media (min-width: 992px) { .htb-hero { padding-top: 70px !important; } }

/* QA 2026-07-07 mobile audit: comparison table clipped at 390px with no scroll affordance */
@media (max-width: 767px) {
  .htb-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .htb-compare-table { min-width: 560px; }
}
