/* Privacy-first analytics consent controls */
:root {
    --button-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='.16'/%3E%3C/svg%3E");
}

.analytics-consent {
    position: fixed;
    z-index: 2000;
    left: 1rem;
    bottom: 1rem;
    width: min(34rem, calc(100vw - 2rem));
    padding: 1rem;
    color: var(--text-color);
    background: var(--white);
    border: 1px solid var(--gray-medium);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.analytics-consent.is-collapsed {
    display: none;
}

.analytics-consent p {
    margin-bottom: 0.75rem;
}

.analytics-consent-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.analytics-consent-actions button {
    padding: 0.55rem 0.8rem;
    color: var(--white);
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    border: 0;
    border-radius: 6px;
    font: inherit;
    cursor: pointer;
}

.analytics-consent-actions button:hover {
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-color), #071f36);
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
}

.analytics-consent-actions a {
    margin-right: auto;
    text-decoration: underline;
}

.analytics-settings {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.analytics-settings[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .analytics-consent-actions {
        justify-content: flex-start;
    }
}
/* Base Styles */
:root {
    --primary-color: #123d66;
    --primary-dark: #0b2b4a;
    --primary-light: #3d719e;
    --secondary-color: #f8f9fa;
    --accent-color: #9a7a3a;
    --accent-dark: #79602f;
    --text-color: #263445;
    --text-light: #5f6d7a;
    --white: #fff;
    --gray-light: #e9ecef;
    --gray-medium: #ced4da;
    --border-radius: 10px;
    --box-shadow: 0 8px 24px rgba(18, 45, 70, 0.08);
    --transition: all 0.2s ease;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    border: none;
    outline: none;
}


h1, h2, h3, h4 {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}


a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}


a:hover {
    color: var(--primary-light);
}


img {
    max-width: 100%;
    height: auto;
}


.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


.btn {
    display: inline-block;
    padding: 1rem !important;
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    letter-spacing: 0.5px;
}


.btn:hover {
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-color), #071f36);
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}


.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}


.btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    align-self: flex-start;
}


.btn-secondary {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    background-image: var(--button-grain), linear-gradient(135deg, #b49350, var(--accent-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
}


.btn-secondary:hover {
    background-image: var(--button-grain), linear-gradient(135deg, var(--accent-color), #604a23);
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
}
/* Header Styles */
.header {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    width: 100%;
    padding: 0;
    opacity: 0.95;
}


/* Header Layout */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px; /* reduced from 150 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


/* Logo */
.logo {
    text-align: center;
    line-height: 0;
}


.logo img {
    height: 100px; /* reduced from 125 */
    width: auto;
    display: block;
}


/* Phone */
.header-phone a {
    font-weight: 700;
    font-size: 1rem;              /* smaller but bold */
    color: var(--primary-color);
    padding: 0.6rem 1rem;
    white-space: nowrap;
    transition: var(--transition);
}




/* Navigation */
.main-nav {
    flex-shrink: 1;
}


.main-nav ul {
    display: flex;
    align-items: center;
    gap: 20px; /* clean spacing */
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap; /* prevents multi-line wrapping */
}


.main-nav li {
    display: flex;
    align-items: center;
    white-space: nowrap; /* prevents text breaking */
}


.main-nav a {
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    font-size: 0.95rem; /* slightly reduced */
}


/* Underline hover effect */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
    opacity: 0;
}


.main-nav a:hover::after {
    width: 100%;
    opacity: 1;
}


/* CTA Buttons */
.nav-cta .btn {
    margin-left: 0.5rem;
    color: var(--gray-light);
    white-space: nowrap;
}


/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}


.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}




/* Hero Section */
.hero {
    background: linear-gradient(rgba(8, 24, 39, 0.62), rgba(8, 24, 39, 0.62)), url('../images/hero-bg-optimized.jpg') no-repeat center center/cover;
    color: var(--white);
    padding: 7rem 0 6rem;
    text-align: center;
    margin-top: 0;
}


.hero-apply {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    margin-top: 0;
}




@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .progress-steps {
        flex-wrap: wrap;
    }
    
    .step {
        flex: 0 0 50%;
        margin-bottom: 1rem;
    }
}


.hero-content {
    max-width: 800px;
    margin: 0 auto;
}


.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}


.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}


.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}


@media (max-width: 768px) {
    .button-grid {
        grid-template-columns: 1fr;
    }
}


/* Value Proposition */
.value-prop {
    padding: 4rem 0;
    text-align: center;
}


.value-prop h2 {
    margin-bottom: 3rem;
}


.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}


/* Desktop layout - 3 cards in one row */
@media (min-width: 1024px) {
    .value-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}


.value-item {
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 4px solid var(--primary-color);
}


.value-item h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}


.value-item p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
}


.value-item ul,
.service-card ul {
    text-align: left;
    margin-top: 1rem;
}


.value-item li,
.service-card li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}


.value-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}


.value-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}


/* Testimonials */
.testimonials {
    background-color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
}


.testimonial-carousel {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    height: 300px;
    overflow: hidden;
}


.testimonial {
    position: absolute;
    width: 100%;
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(20px);
}


.testimonial.active {
    opacity: 1;
    transform: translateY(0);
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.testimonial-content {
    position: relative;
    padding: 0 1rem;
}


.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
}


.client-info {
    text-align: center;
}


.client-name {
    font-weight: 700;
}


.client-location {
    color: var(--text-light);
    font-size: 0.9rem;
}


.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
    padding: 0 1rem;
    flex-wrap: wrap;
}


.carousel-prev, .carousel-next {
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    flex-shrink: 0;
}


.carousel-prev:hover, .carousel-next:hover {
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-color), #071f36);
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
}


.carousel-position {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 10px;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}


.carousel-indicators {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    max-width: 300px;
    padding: 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    cursor: grab;
    user-select: none;
}


.carousel-indicators::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}


.carousel-indicators.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}


.carousel-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-medium);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    flex-shrink: 0;
}


.carousel-indicator.active {
    background: var(--primary-color);
    color: var(--white);
}


.carousel-indicator:hover {
    background: var(--primary-light);
    color: var(--white);
}


.team-position {
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}


/* Services Overview */
.services-overview {
    padding: 4rem 0 2rem;
    text-align: center;
    min-height: calc(100vh - 400px); /* Adjust based on header/footer height */
}


.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}


.service-card {
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-medium);
    min-height: 300px;
    flex: 1;
}


/* Services grid layout for desktop */
@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .service-card {
        width: 100%;
        max-width: 100%;
        height: 100%;
    }
}


.service-card ul {
    margin: 1.5rem 0;
    list-style: none;
    padding-left: 0;
}


.service-card li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}


.service-card li:before {
    content: "\2714";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}


.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}


.service-card p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.7;
}


.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}


.service-card h3 {
    margin-bottom: 1rem;
}


.service-card p {
    margin-bottom: 1.5rem;
}


/* CTA Section */
.cta-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}


.cta-content h2 {
    margin-bottom: 1rem;
}


.cta-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}


.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}


/* Footer */
.footer {
    background-color: #002147;
    color: var(--white);
    padding: 5rem 0 0;
}


.footer a {
    color: var(--white);
    opacity: 0.9;
    transition: var(--transition);
}


.footer a:hover {
    color: var(--accent-color);
    opacity: 1;
}


.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}


.footer-col h3 {
    color: var(--white);
    margin-bottom: 1.75rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.75rem;
}


.footer-col h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
}


.footer-col ul {
    list-style: none;
}


.footer-col li {
    margin-bottom: 0.75rem;
}


.footer-contact p {
    margin-bottom: 0.5rem;
}


.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}


.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}


.social-links a:hover {
    background-color: var(--primary-light);
}


.newsletter input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}


.newsletter button {
    width: 100%;
    padding: 0.75rem;
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}


.newsletter button:hover {
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-color), #071f36);
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
}


.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}


.footer-bottom p {
    margin-bottom: 0.5rem;
}


/* Calculator Section */
.calculator-section {
    padding: 4rem 1rem;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
}


.calculator-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 auto 2rem;
}


.calculator-tab {
    padding: 0.8rem 1.15rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--primary-color);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}


.calculator-tab:hover,
.calculator-tab:focus-visible,
.calculator-tab.is-active {
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
}


.calculator-tab:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}


.calculator-panel[hidden] {
    display: none;
}


.calculator-panel > .calculator-container {
    margin-top: 0;
}


.calculator-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    justify-items: center;
}


@media (min-width: 992px) {
    .calculator-container {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 2rem;
    }
}


.calculator-card,
.calculator-info {
    width: 100%;
    max-width: 500px;
    height: 100%;
}


@media (min-width: 992px) {
    .calculator-card,
    .calculator-info {
        max-width: none;
    }
}


/* Rest of the code remains the same */
.calculator-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-medium);
}


.calculator-card h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}


.calculator-info {
    background: var(--secondary-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-medium);
}


.calculator-info-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}


.calculator-info-content ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}


.calculator-info-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}


.calculator-tip {
    background: rgba(255, 107, 53, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    corner-shape: squircle;
}


.calculator-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    display: none;
}


.calculator-result-error {
    border-left: 4px solid #b42318;
    color: #7a271a;
}


.calculator-result-note {
    margin: 1.25rem 0 0;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
}


.calculator-result h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}


.payment-breakdown {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
}


.payment-total {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-medium);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
}


.payment-breakdown span,
.payment-total span {
    padding-right: 1rem;
}


.calculator-card > p {
    margin: -1rem 0 1.5rem;
    text-align: center;
}


@media (max-width: 600px) {
    .calculator-section {
        padding: 2.5rem 1rem;
    }

    .calculator-tabs {
        align-items: stretch;
        flex-direction: column;
    }

    .calculator-tab {
        width: 100%;
    }

    .calculator-card,
    .calculator-info {
        padding: 1.5rem;
    }
}


.loan-type {
    margin-top: 1rem;
    font-style: italic;
    text-align: center;
}


/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}


.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}


.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-medium);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--text-color);
}


.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 62, 111, 0.1);
}


.form-group input:hover,
.form-group select:hover {
    border-color: var(--primary-light);
}


/* Content Section */
.content-section {
    padding: 4rem 0;
    background-color: var(--white);
}


.policy-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}


.policy-content h2 {
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}


.policy-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}


.policy-content ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}


.policy-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}


.policy-content a {
    color: var(--primary-color);
    font-weight: 600;
}


.policy-content a:hover {
    color: var(--primary-light);
}


.policy-content em {
    color: var(--text-light);
    font-style: italic;
}


/* Privacy List Styling */
.privacy-list {
    /* max-width: 90%; */
}


.privacy-list li {
    margin-bottom: 1.5rem !important;
    line-height: 1.7 !important;
    /* color: var(--text-color); */
}


/* Mobile adjustments for privacy list */
@media (max-width: 768px) {
    .privacy-list {
        max-width: 95%;
        margin: 1.5rem auto !important;
        padding: 1.5rem !important;
    }
    
    .privacy-list li {
        margin-bottom: 1rem !important;
    }
}


.priv-links {
    color: var(--secondary-color);
    text-decoration: underline;
}

#homebot_homeowner {
    display: block;
    width: min(100% - 2rem, 1100px);
    margin: 2.5rem auto 4rem;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(18, 61, 102, 0.12);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}


.floating-action-pair {
    position: fixed;
    right: 80px;
    bottom: 20px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 0;
    border-radius: 999px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
}


.floating-action-apply {
    display: inline-flex;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 999px 0 0 999px;
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
}


.floating-action-apply:hover,
.floating-action-apply:focus-visible {
    background-image: var(--button-grain), linear-gradient(135deg, var(--primary-color), #071f36);
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
    color: var(--white);
}


.floating-action-apply:focus-visible {
    outline: 3px solid #2353b3;
    outline-offset: 3px;
}


.floating-action-pair chat-bubble-snippet {
    display: block;
    position: absolute !important;
    right: -60px;
    bottom: 0;
    flex: 0 0 0;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    overflow: visible;
    border-radius: 0 999px 999px 0;
    --search-snippet-primary-color: var(--primary-color);
    --search-snippet-primary-hover: var(--primary-dark);
    --search-snippet-focus-ring: rgba(16, 62, 111, 0.35);
    --chat-bubble-button-right: 20px;
    --chat-bubble-button-bottom: 20px;
    --chat-bubble-position: fixed;
    --chat-bubble-button-radius: 0 999px 999px 0;
    --chat-bubble-button-shadow: none;
    --site-chat-button-gradient: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    --site-chat-button-hover-gradient: linear-gradient(135deg, var(--primary-color), #071f36);
    --site-chat-button-grain: var(--button-grain);
    --site-chat-hover-color: var(--accent-color);
}


.floating-action-pair chat-bubble-snippet:hover {
    --search-snippet-primary-hover: var(--accent-color);
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--white);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}


.skip-link:focus {
    top: 0;
}




/* Mobile Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}


.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}


.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}


.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}


.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
    visibility: hidden;
}


.mobile-menu.active {
    right: 0;
    visibility: visible;
}


.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}


.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}


.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    display: none; /* Hide the gray X */
    align-items: center;
    justify-content: center;
    z-index: 1002;
}


.mobile-nav {
    margin-top: 3rem;
}


.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


.mobile-nav li {
    margin-bottom: 1rem;
}


.mobile-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    padding: 0.75rem 0;
    transition: color 0.3s ease;
    border-bottom: 1px solid var(--gray-light);
}


.mobile-nav a:hover {
    color: var(--primary-color);
}


.mobile-nav .btn {
    margin-top: 1rem;
    text-align: center;
    width: 100%;
}


/* Ensure body doesn't scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}


/* Mobile-First Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .header .container {
        height: auto;
        padding: 1rem;
    }
    
    .logo img {
        height: 80px;
        width: auto;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .hamburger {
        display: flex !important;
    }
    
    /* Ensure body doesn't scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }


    .hero {
        padding: 5rem 1rem 4rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .btn, .btn-large, .btn-secondary {
        width: 100%;
        padding: 1rem !important;
        font-size: 1rem;
    }
    
    .value-prop, .testimonials, .services-overview, .cta-section {
        padding: 3rem 1rem;
    }
    
    .value-grid, .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-item, .service-card {
        padding: 1.5rem;
        margin: 0;
    }
    
    .testimonial-carousel {
        height: 300px;
        min-height: 300px;
        position: relative;
    }
    
    .testimonial {
        position: absolute;
        margin-bottom: 0;
        opacity: 0;
        height: auto;
        overflow: visible;
        transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
        transform: translateY(20px);
        pointer-events: none;
    }
    
    .testimonial.active {
        opacity: 1;
        height: auto;
        padding: 1.5rem;
        pointer-events: all;
        transform: translateY(0);
    }
    
    .carousel-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-indicators {
        max-width: 200px;
        order: 0;
        margin-top: 0;
        flex-basis: auto;
        justify-content: center;
    }
    
    .carousel-position {
        order: 0;
        margin: 0 10px;
    }
    
    .carousel-prev, .carousel-next {
        padding: 0.75rem 1rem;
        font-size: 16px;
        order: 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer {
        padding: 3rem 1rem 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .floating-action-pair {
        right: 72px;
        bottom: 12px;
    }

    .floating-action-apply {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }

    .floating-action-pair chat-bubble-snippet {
        right: -56px;
        --chat-bubble-button-right: 12px;
        --chat-bubble-button-bottom: 12px;
    }
    
    /* Ensure text is readable without zoom */
    body {
        font-size: 16px;
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Prevent horizontal scrolling */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Prevent body scroll when menu is open */
    body.no-scroll {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}


/* Extra small devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero {
        padding: 4rem 1rem 3rem;
    }
    
    .value-item, .service-card {
        padding: 1rem;
    }
    
    .testimonial {
        padding: 1rem;
    }
    
    .carousel-indicators {
        max-width: 150px;
    }
    
    .carousel-indicator {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

/* Shared visual refinements */
.header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(18, 61, 102, 0.08);
    opacity: 1;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    height: 96px;
}

.logo img {
    height: 72px;
}

.logo small {
    display: block;
    color: var(--text-light);
    font-size: 0.72rem;
    line-height: 1.2;
    margin-top: 0.35rem;
}

.main-nav a[aria-current="page"]::after {
    width: 100%;
    opacity: 1;
}

.mobile-nav a[aria-current="page"] {
    color: var(--primary-color);
    border-bottom-color: var(--primary-light);
}

.value-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: #edf2f7;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.main-nav ul {
    gap: clamp(0.65rem, 1.3vw, 1.25rem);
}

.main-nav a {
    font-size: 0.9rem;
}

.main-nav .nav-cta .btn {
    padding: 0.8rem 1rem !important;
    color: var(--white);
    font-size: 0.85rem;
}

.hero {
    padding: clamp(5rem, 9vw, 7rem) 0;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    letter-spacing: -0.025em;
}

.subtitle {
    font-weight: 400;
}

.value-item,
.service-card,
.calculator-card,
.calculator-info {
    border: 1px solid rgba(18, 61, 102, 0.1);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.service-card {
    color: inherit;
    text-decoration: none;
}

.service-card h3 {
    color: var(--primary-color);
}

.value-item,
.service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.value-item:hover,
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(18, 45, 70, 0.13);
}

.btn {
    border-radius: 8px;
    letter-spacing: 0.01em;
}

.btn:hover {
    transform: translateY(-2px);
}

.footer {
    background-color: #0c2b49;
}

.footer a:hover {
    color: #e3c27b;
}

.skip-link {
    color: var(--primary-color);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #d5ad5d;
    outline-offset: 3px;
}

@media (max-width: 1080px) {
    .header .container {
        height: 82px;
    }

    .logo img {
        height: 60px;
    }

    .desktop-nav {
        display: none !important;
    }

    .hamburger {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .header .container {
        height: 76px;
    }

    .logo img {
        height: 54px;
    }

    .hero {
        padding: 4.5rem 1rem 3.75rem;
    }

    .value-prop h2,
    .testimonials h2,
    .services-overview h2,
    .cta-section h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .mobile-menu {
        width: min(88vw, 380px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Expanded Loan Options and First-Time Buyer Guide */
.buyer-guide,
.loan-comparison,
.loan-faq,
.loan-cta {
    margin: 4rem auto 0;
    text-align: left;
}

.buyer-guide h2,
.loan-comparison h2,
.loan-faq h2,
.loan-cta h2 {
    color: var(--primary-color);
    text-align: center;
    font-size: 2rem;
}

.buyer-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.buyer-steps article,
.comparison-grid div {
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.75rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 700;
}

.buyer-steps h3,
.comparison-grid h3 {
    color: var(--primary-color);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.loan-faq {
    max-width: 900px;
}

.loan-faq details {
    border-bottom: 1px solid var(--gray-medium);
    padding: 1rem 0;
}

.loan-faq summary {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.05rem;
}

.loan-faq details p {
    padding: 0.75rem 0 0;
    color: var(--text-light);
}

.loan-cta {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    corner-shape: squircle;
}

.loan-cta h2,
.loan-cta p {
    color: var(--white);
}

.loan-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.loan-cta-actions .btn-small {
    margin-top: 0;
    align-self: center;
    background-image: var(--button-grain), linear-gradient(135deg, #b49350, var(--accent-dark));
    background-size: 160px 160px, auto;
    background-blend-mode: soft-light, normal;
}

.loan-disclaimer {
    max-width: 850px;
    margin: 1.25rem auto 0;
}

@media (max-width: 1023px) {
    .buyer-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .buyer-steps,
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .buyer-guide,
    .loan-comparison,
    .loan-faq,
    .loan-cta {
        margin-top: 3rem;
    }

    .loan-cta-actions {
        flex-direction: column;
    }

    .loan-cta-actions .btn,
    .loan-cta-actions .btn-small {
        width: 100%;
    }
}

/* Global squircle shape for the whole site */
:where(
    .btn,
    .header,
    .mobile-menu,
    .calculator-tab,
    .service-card,
    .buyer-steps article,
    .comparison-grid div,
    .loan-cta,
    .calculator-card,
    .calculator-container,
    .calculator-info,
    .calculator-result,
    .testimonial,
    .value-item,
    .cta-section,
    .video-card,
    .resource-card,
    .feature-card,
    .info-card,
    input,
    select,
    textarea
) {
    border-radius: var(--border-radius);
    corner-shape: squircle;
}

/* Fixed corner radii converted to the shared squircle */
.header-phone a,
.carousel-prev,
.carousel-next,
.hamburger span {
    border-radius: var(--border-radius);
    corner-shape: squircle;
}

.calculator-tip {
    border-radius: var(--border-radius);
    corner-shape: squircle;
}

.loan-cta {
    border-radius: var(--border-radius);
    corner-shape: squircle;
}
