@import url("https://fonts.cdnfonts.com/css/sophie-fancy");

/* Base Styles */
html {
    font-size: 100%; /* Base 16px for mobile */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Sophie Fancy", serif;
    font-size: 1rem; /* 16px base */
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    padding-top: var(--header-height);
    overflow-x: hidden; /* Prevent horizontal scrolling */
    word-wrap: break-word; /* Prevent text overflow */
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .hero-text {
    text-align: right;
}

html[dir="rtl"] .hero-text .hero-cta-button {
    align-self: flex-end;
}

html[dir="rtl"] .footer-columns {
    text-align: right;
}

html[dir="rtl"] .footer-contact-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .lead-form label,
html[dir="rtl"] .lead-form input,
html[dir="rtl"] .lead-form select {
    text-align: right;
}

html[dir="rtl"] .service-features li {
    padding-left: 0;
    padding-right: 1.25rem;
}

html[dir="rtl"] .service-features li:before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .personal-finance-list,
html[dir="rtl"] .personal-finance-steps,
html[dir="rtl"] .mortgage-list,
html[dir="rtl"] .mortgage-steps {
    padding-left: 0;
    padding-right: 1.5rem;
}

* {
    font-family: "Sophie Fancy", serif;
}

:root {
    --header-height: 72px;
    --button-font-size: 1rem; /* Increased from 0.95rem for better readability */
    --button-padding-y: 0.875rem; /* Increased for better touch targets */
    --button-padding-x: 1.75rem;
    --button-min-height: 44px; /* Minimum touch target size */
    --button-radius: 999px;
    --button-max-width: 240px;
    --max-content-width: 1200px; /* Max width for content containers */
    --text-max-width: 65ch; /* Optimal reading width */
}

/* Logo Header */
.logo-header {
    position: fixed;
    width: 100%;
    max-width: 100vw; /* Prevent overflow */
    padding: 0;
    margin: 0;
    background-color: #ffffff;
    z-index: 9999;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 20px 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.site-logo {
    height: 60px;
    width: auto;
    display: block;
    margin: 6px 10px 6px 26px;
    padding: 0;
    max-width: 200px;
    max-width: min(200px, calc(100vw - 100px)); /* Prevent overflow on small screens */
    object-fit: contain;
    order: 2;
    flex-shrink: 1;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    order: 2;
    transition: transform 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: rgba(2, 48, 32, 0.1);
}

.logo-link:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.logo-link:active {
    transform: scale(0.98);
}

.logo-link:focus {
    outline: 2px solid #023020;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 44px; /* Minimum touch target */
    height: 44px; /* Minimum touch target */
    min-width: 44px; /* Ensure minimum size */
    min-height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 7px; /* Add padding for better touch area */
    margin: 6px 10px 6px 10px; /* Reduced margin for mobile */
    z-index: 101;
    order: 1;
    flex-shrink: 0;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: #023020;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu:hover {
    opacity: 0.8;
}

.hamburger-menu:focus {
    outline: 2px solid #023020;
    outline-offset: 2px;
    border-radius: 4px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background-color: transparent;
    box-shadow: none;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 100;
    padding-top: 80px;
    overflow-y: auto;
}

.main-nav.active {
    transform: translateX(0);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
    border-radius: 16px;
}

.nav-list li {
    margin: 0;
    width: 100%;
}

.nav-list a {
    display: block;
    color: #023020;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    width: 100%;
    border-radius: 16px;
    background-color: rgba(2, 48, 32, 0.18);
    border: 1px solid rgba(2, 48, 32, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-list a:hover {
    color: #023020;
    background-color: rgba(2, 48, 32, 0.08);
    border-color: rgba(2, 48, 32, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.nav-list a:active {
    transform: translateY(0);
    background-color: rgba(2, 48, 32, 0.12);
}

.nav-list a:focus {
    outline: 2px solid #023020;
    outline-offset: 2px;
}

/* Overlay for mobile menu */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.menu-overlay.active {
    display: block;
}

/* Tablet and up */
@media (min-width: 768px) {
    html {
        font-size: 112.5%; /* 18px base for tablet */
    }

    :root {
        --header-height: 80px;
        --button-font-size: 1rem;
        --button-padding-y: 0.8rem;
        --button-padding-x: 2rem;
        --button-min-height: 48px;
        --button-max-width: 260px;
    }

    .logo-header {
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .site-logo {
        height: 70px;
        max-width: 250px;
        max-width: min(250px, calc(100vw - 120px)); /* Prevent overflow */
        margin: 6px 10px 6px 26px;
        padding: 0;
        order: 2;
        flex-shrink: 1;
    }

    .hamburger-menu {
        display: none;
    }

    .main-nav {
        position: static;
        width: auto;
        height: auto;
        order: 1;
        background-color: transparent;
        box-shadow: none;
        transform: translateX(0);
        padding-top: 0;
        overflow-y: visible;
    }

    .nav-list {
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
        width: auto;
        padding: 0;
    }

    .nav-list li {
        width: auto;
    }

    .nav-list a {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        width: auto;
        border-radius: 6px;
        background-color: rgba(2, 48, 32, 0.03);
        border: 1px solid rgba(2, 48, 32, 0.1);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .nav-list a:hover {
        background-color: rgba(2, 48, 32, 0.08);
        border-color: rgba(2, 48, 32, 0.15);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        color: #023020;
        transform: translateY(-1px);
    }

    .nav-list a:active {
        transform: translateY(0);
    }

    .nav-list a:focus {
        outline: 2px solid #023020;
        outline-offset: 2px;
    }

    .menu-overlay {
        display: none !important;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    html {
        font-size: 125%; /* 20px base for desktop */
    }

    :root {
        --header-height: 120px;
    }

    .logo-header {
        padding: 0;
        margin: 0;
        justify-content: flex-start;
        gap: 1.5rem;
    }

    .site-logo {
        height: 120px;
        max-width: 400px;
        margin: 6px 10px 6px 26px;
        padding: 0;
        order: 1;
        flex-shrink: 0;
    }

    .main-nav {
        order: 2;
    }

    .nav-list {
        gap: 2.5rem;
    }

    .nav-list a {
        font-size: 1.0625rem;
        padding: 0.625rem 1rem;
        background-color: transparent;
        border: none;
        box-shadow: none;
        transition: color 0.2s ease, transform 0.1s ease;
    }

    .nav-list a:hover {
        color: #023020;
        transform: translateY(-1px);
    }

    .nav-list a:active {
        transform: translateY(0);
    }

    .nav-list a:focus {
        outline: 2px solid #023020;
        outline-offset: 2px;
        border-radius: 4px;
    }
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    padding: 0;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 100vw; /* Prevent overflow */
    margin-left: 0;
    margin-right: 0;
    background-image: var(--hero-image-mobile);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden; /* Prevent image overflow */
}

.hero-image {
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    height: auto;
    display: block;
    visibility: hidden;
    object-fit: cover; /* Ensure proper scaling */
}

.hero-image-desktop {
    display: none;
}

.hero-image-mobile {
    display: block;
}

.hero-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
}

.hero-text .hero-cta-button {
    margin-top: auto;
    margin-bottom: 1rem;
    width: 100%; /* Full width on mobile for better touch targets */
    max-width: 100%;
    padding: var(--button-padding-y) var(--button-padding-x);
    font-size: var(--button-font-size);
    min-height: var(--button-min-height);
    min-width: 44px; /* Ensure minimum touch target */
    border-radius: var(--button-radius);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-line-break {
    display: none;
}

/* Mobile: show line breaks in hero subheading for the three-line layout */
.mobile-line-break {
    display: block;
}

/* Mobile-first: Base styles for mobile */
.hero-text h1 {
    font-size: 1.75rem; /* 28px - readable on mobile */
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem;
    line-height: 1.4; /* Improved readability */
    word-wrap: break-word;
    hyphens: auto;
}

.hero-text p {
    font-size: 1rem; /* 16px - minimum readable size */
    color: #ffffff;
    margin: 0 0 1rem;
    line-height: 1.7; /* Improved readability (1.5-1.7 range) */
    word-wrap: break-word;
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    html {
        font-size: 93.75%; /* 15px base for very small screens */
    }

    .hero-text h1 {
        font-size: 1.375rem; /* 22px - still readable */
    }

    .hero-text p {
        font-size: 0.9375rem; /* 15px */
    }

    #services h2,
    #why-us h2,
    #cta-secondary h2 {
        font-size: 1.5rem;
    }

    .about-container h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-text {
        justify-content: flex-start;
        padding-top: 16px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-text h1 {
        font-family: "Sophie Fancy", serif;
        font-size: 1.5rem; /* Slightly smaller for very small screens */
        line-height: 1.4;
    }

    .hero-text p {
        font-family: "Sophie Fancy", serif;
        font-size: 0.9375rem; /* 15px - still readable */
        line-height: 1.7;
    }
}

.hero-text small {
    display: block;
    font-size: 0.875rem;
    color: #ffffff;
    margin-bottom: 0;
}

.hero-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem 3rem; /* Reduced padding on mobile */
    box-sizing: border-box;
}

/* Tablet and up */
@media (min-width: 768px) {
    html[dir="rtl"] .hero-text {
        align-items: flex-end;
    }

    .hero-image-mobile {
        display: none;
    }

    .hero-image-desktop {
        display: block;
    }

    .hero-text {
        padding: 3rem 2rem;
        align-items: flex-start;
        text-align: left;
    }

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

    .hero-text p {
        font-size: 1.125rem;
        margin-bottom: 1.25rem;
    }

    .hero-text small {
        font-size: 1rem;
    }

    .hero-content {
        padding: 3rem 2rem 4rem;
    }

    .hero-text .hero-cta-button {
        margin-left: 0;
        margin-right: 0;
        align-self: flex-start;
        width: auto; /* Auto width on tablet+ */
        max-width: var(--button-max-width);
    }

    .hero-image-container {
        background-image: var(--hero-image-desktop);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    html[dir="rtl"] .hero-text {
        align-items: flex-end;
        text-align: right;
    }

    html[dir="rtl"] .hero-text .hero-cta-button {
        align-self: flex-end;
    }

    /* Main page, mortgage, personal-finance: hero text on the left side in desktop view */
    #hero.hero .hero-text,
    .mortgage-hero .hero-text,
    .personal-finance-hero .hero-text {
        margin-inline-start: auto;
        margin-inline-end: 0;
        align-items: flex-end;   /* left in RTL */
        text-align: left;
        padding-inline-start: 2.5rem;
        padding-inline-end: 3rem;
    }

    #hero.hero .hero-text .hero-cta-button,
    .mortgage-hero .hero-text .hero-cta-button,
    .mortgage-hero .hero-text .mortgage-cta,
    .personal-finance-hero .hero-text .hero-cta-button,
    .personal-finance-hero .hero-text .personal-finance-cta {
        align-self: flex-end;   /* left in RTL */
    }

    .hero-text {
        padding: 2.5rem 2.5rem 4rem;
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
        font-family: "Sophie Fancy", serif;
        max-width: 1200px; /* Limit width for readability */
        margin: 0 auto;
    }

    .desktop-line-break {
        display: block;
    }

    .mobile-line-break {
        display: none;
    }

    .hero-text .hero-cta-button {
        margin-top: 1.5rem;
        margin-bottom: 0;
        width: auto; /* Auto width on desktop */
        max-width: var(--button-max-width);
    }

    .hero-text h1 {
        font-size: 4.25rem;
        line-height: 1.2; /* Tighter line-height for large headings */
        max-width: 65ch; /* Optimal reading width */
    }

    .hero-text p {
        font-size: 1.95rem;
        line-height: 1.7;
        max-width: 65ch; /* Optimal reading width */
    }

    .hero-content {
        padding: 4rem 2rem 5rem;
        max-width: var(--max-content-width);
    }
}

/* Lead Form */
.lead-form {
    position: relative;
    max-width: 720px;
    width: 100%;
    margin: 2rem auto 0;
    text-align: left;
    background-color: #ffffff;
    padding: 2rem 1.25rem 2rem; /* Reduced padding on mobile */
    border-radius: 24px; /* Smaller radius on mobile */
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    box-sizing: border-box;
}

.lead-form form {
    display: block;
}

.lead-form .form-field {
    display: block;
}

.lead-form label {
    display: block;
    font-size: 1rem; /* 16px - readable */
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.lead-form input,
.lead-form select {
    width: 100%;
    font-size: 1rem; /* 16px - prevents zoom on iOS */
    padding: 0.875rem 1rem; /* Increased padding for better touch targets */
    margin-bottom: 1.25rem;
    border: 1px solid #cfe3d6;
    border-radius: 10px;
    background-color: #eaf5ef;
    color: #1a1a1a;
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px; /* Minimum touch target */
    box-sizing: border-box;
    line-height: 1.5;
}

.lead-form input:focus,
.lead-form select:focus {
    outline: none;
    border-color: #023020;
    box-shadow: 0 0 0 3px rgba(2, 48, 32, 0.15);
    transform: translateY(-1px);
}

.lead-form input:hover,
.lead-form select:hover {
    border-color: rgba(2, 48, 32, 0.3);
}

.lead-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.lead-form button[type="submit"] {
    width: 100%; /* Full width on mobile */
    font-size: var(--button-font-size);
    font-weight: 600;
    padding: var(--button-padding-y) var(--button-padding-x);
    background-color: #023020;
    color: #ffffff;
    border: none;
    border-radius: var(--button-radius);
    cursor: pointer;
    min-height: var(--button-min-height);
    min-width: 44px; /* Ensure minimum touch target */
    margin-top: 0.5rem;
    max-width: 100%;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
}

.lead-form .form-field button[type="submit"] {
    display: inline-flex;
    align-self: flex-start;
}

.lead-form button[type="submit"]:hover {
    background-color: #034a2f;
    transform: translateY(-1px);
}

.lead-form button[type="submit"]:active {
    background-color: #012a1c;
    transform: translateY(0);
}

.lead-form button[type="submit"]:focus {
    outline: 2px solid #023020;
    outline-offset: 2px;
}

.lead-form .optional {
    font-weight: 400;
    font-size: 0.875rem;
    color: #777;
}

.lead-form fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
}

.lead-form legend {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    padding: 0;
}

.lead-form .radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lead-form .radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid #cfe3d6;
    border-radius: 10px;
    background-color: #eaf5ef;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    min-height: 48px;
}

.lead-form .radio-label:hover {
    border-color: #023020;
    background-color: rgba(2, 48, 32, 0.02);
}

.lead-form .radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #023020;
    flex-shrink: 0;
}

.lead-form .radio-label input[type="radio"]:focus {
    outline: 2px solid #023020;
    outline-offset: 2px;
}

.lead-form .radio-label span {
    flex: 1;
}

.form-thankyou {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #f0f7f4;
    border: 1px solid #023020;
    border-radius: 6px;
    text-align: center;
}

.form-thankyou p {
    font-size: 1.125rem;
    font-weight: 500;
    color: #023020;
    margin: 0;
}

.form-error {
    max-width: 720px;
    margin: 0 auto 1rem;
    padding: 1rem 1.25rem;
    background-color: #fef2f2;
    border: 1px solid #b91c1c;
    border-radius: 10px;
    color: #b91c1c;
    font-size: 1rem;
    text-align: center;
}

.thank-you-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.thank-you-page .thank-you-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.thank-you-page p {
    margin-bottom: 1.5rem;
}

.thank-you-page .cta-button {
    display: inline-block;
}

/* Tablet and up */
@media (min-width: 768px) {
    .lead-form {
        max-width: 760px;
        padding: 3.5rem 2.75rem 2.75rem;
        border-radius: 36px; /* Larger radius on tablet+ */
    }

    .lead-form button[type="submit"] {
        width: auto; /* Auto width on tablet+ */
        max-width: var(--button-max-width);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .lead-form {
        max-width: 900px; /* Constrain width for better UX */
        width: 100%;
        margin: 2rem auto 0;
    }

    .lead-form form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.5rem;
        row-gap: 0.75rem;
    }

    .lead-form .form-field {
        width: 100%;
    }

    .lead-form .form-action {
        grid-column: 1 / -1;
        display: flex;
        justify-content: center;
    }

    .lead-form .form-field button[type="submit"] {
        width: auto;
        max-width: var(--button-max-width);
    }

    .lead-form label {
        font-size: 1.0625rem; /* Slightly larger on desktop */
    }

    .lead-form input,
    .lead-form select {
        font-size: 1.0625rem; /* Slightly larger on desktop */
    }
}

@media (max-width: 768px) {
    .lead-form .form-action {
        display: flex;
        justify-content: center;
    }

    .lead-form {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        width: calc(100% - 1rem); /* Ensure no overflow */
    }
}

@media (max-width: 480px) {
    .lead-form {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .lead-form label {
        font-size: 0.9375rem; /* 15px */
    }

    .lead-form input,
    .lead-form select {
        font-size: 1rem; /* Keep 16px to prevent iOS zoom */
    }
}

/* Our Services Section */
#services {
    padding: 2.5rem 1rem; /* Reduced padding on mobile */
    background-color: #023020;
    max-width: 100%;
    width: 100%;
    margin: 0.5rem auto 2rem;
    border-radius: 24px; /* Smaller radius on mobile */
    font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    box-sizing: border-box;
}

#services h2 {
    text-align: center;
    font-size: 1.75rem; /* Reduced for mobile */
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2rem; /* Reduced spacing on mobile */
    line-height: 1.4;
    padding: 0 0.5rem; /* Prevent text touching edges */
    word-wrap: break-word;
}

.services-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Reduced gap on mobile */
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem; /* Add padding to prevent edge touching */
    justify-content: center;
    align-items: stretch; /* Stretch cards to full width */
    box-sizing: border-box;
}

.service-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.25rem; /* Reduced gap on mobile */
    background-color: #ffffff;
    padding: 1.5rem 1rem; /* Reduced padding on mobile */
    padding-bottom: 5.5rem;
    border: 1px solid #e3e8ee;
    border-radius: 24px; /* Smaller radius on mobile */
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    min-height: auto; /* Remove fixed min-height on mobile */
    flex: 1;
    flex-basis: auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(2, 48, 32, 0.1); /* Better touch feedback */
}

@media (max-width: 767px) {
    .service-card {
        padding-bottom: 5.5rem;
        min-width: 0; /* Ensure no overflow */
    }

    .service-icon i {
        font-size: 5rem; /* Slightly smaller on very small screens */
    }
}

@media (max-width: 480px) {
    .service-icon i {
        font-size: 4rem; /* Even smaller for very small screens */
    }

    .service-card {
        padding: 1.25rem 0.875rem;
        padding-bottom: 5rem;
    }
}

.service-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
    text-align: center;
    transform: translateY(0);
}

.service-footer-text {
    margin-top: auto;
    width: 100%;
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    background-color: #023020;
    border-radius: 999px;
    padding: 0.875rem 1rem; /* Increased padding for better touch area */
    font-family: "Sophie Fancy", serif;
    font-size: 0.9375rem; /* 15px - readable */
    line-height: 1.5;
    min-height: 44px; /* Minimum touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.service-card:hover .service-footer-text {
    background-color: #034a2f;
    transform: translateY(-1px);
}

.service-card:active .service-footer-text {
    transform: translateY(0);
}

.service-footer-amount {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.riyal-icon {
    width: 0.9em;
    height: 0.9em;
    display: inline-block;
    filter: brightness(0) invert(1);
}

@media (max-width: 767px) {
    .service-footer-text--mobile-up {
        margin-bottom: 0.8rem;
    }
}


.service-copy h3 {
    font-size: 1.25rem; /* Slightly reduced for mobile */
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.4; /* Improved readability */
    text-align: center;
    word-wrap: break-word;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background-color: transparent;
    color: #023020;
    flex-shrink: 0;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.service-icon i {
    font-size: 6rem;
}

.service-description {
    font-size: 1rem; /* Reduced from 1.35rem for mobile readability */
    color: #334155;
    line-height: 1.7; /* Improved readability (1.5-1.7 range) */
    margin: 0;
    text-align: center;
    word-wrap: break-word;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.service-features li {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0.625rem;
    padding-left: 1.25rem;
    position: relative;
}

.service-features li:before {
    content: "•";
    color: #7a8a99;
    font-weight: bold;
    font-size: 1.25rem;
    position: absolute;
    left: 0;
    line-height: 1.2;
}

.service-features li:last-child {
    margin-bottom: 0;
}

.service-card:hover {
    border-color: rgba(2, 48, 32, 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
    transform: translateY(-4px);
}

.service-card:hover .service-icon {
    background-color: transparent;
    transform: translateY(-2px) scale(1.05);
}

.service-card:active {
    border-color: rgba(2, 48, 32, 0.5);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.service-card:focus {
    outline: 2px solid #023020;
    outline-offset: 2px;
}

/* Tablet and up */
@media (min-width: 768px) {
    #services {
        padding: 4rem 2rem;
    }

    #services h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .services-cards {
        gap: 2.4rem;
    }

    .service-card {
        padding: 2.5rem 2rem;
        padding-bottom: 2.5rem;
        min-height: 560px;
    }

    .service-card h3 {
        font-size: 1.35rem;
        margin-bottom: 1.25rem;
    }

    .service-description {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .service-features li {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
        padding-left: 1.5rem;
    }
}

@media (min-width: 768px) {
    html[dir="rtl"] .service-features li {
        padding-left: 0;
        padding-right: 1.5rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    #services {
        padding: 5rem 2rem;
        background-color: transparent;
        max-width: var(--max-content-width); /* Constrain width */
        margin: 0.5rem auto 2rem;
    }

    #services::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50%;
        background-color: #023020;
        border-radius: 32px;
        z-index: 0;
    }

    #services > * {
        position: relative;
        z-index: 1;
    }

    #services h2 {
        font-size: 3rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
        margin-left: auto;
        margin-right: auto;
    }

    .services-cards {
        flex-direction: row;
        gap: 3rem;
        align-items: stretch;
        max-width: var(--max-content-width);
        padding: 0;
    }

    .service-card {
        padding: 3.5rem 3rem;
        padding-bottom: 3.5rem;
        min-height: 640px;
        border-radius: 36px; /* Larger radius on desktop */
    }

    .service-card h3 {
        font-size: 1.7rem;
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }

    .service-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.7;
        max-width: 100%;
    }

    .service-features li {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
        line-height: 1.7;
    }
}

/* What We Provide Section */

/* Why Choose Us Section */
#why-us {
    padding: 2.5rem 1rem; /* Reduced padding on mobile */
    background-color: #ffffff;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

#why-us h2 {
    text-align: center;
    font-size: 1.75rem; /* Reduced for mobile */
    font-weight: 700;
    color: #023020;
    margin-bottom: 2rem; /* Reduced spacing on mobile */
    line-height: 1.4;
    padding: 0 0.5rem;
    word-wrap: break-word;
}

.why-us-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Reduced gap on mobile */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem; /* Add padding to prevent edge touching */
    box-sizing: border-box;
}

.why-us-item {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 1rem; /* Reduced gap on mobile */
    background-color: #ffffff;
    padding: 1rem 1rem; /* Increased padding for better touch area */
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
    min-height: 44px; /* Minimum touch target */
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.why-us-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.why-us-item:active {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.why-us-icon {
    width: 48px; /* Slightly smaller on mobile */
    height: 48px;
    min-width: 48px; /* Ensure minimum size */
    min-height: 48px;
    border-radius: 50%;
    background-color: #e6f0ec;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.why-us-icon i {
    font-size: 1.5rem;
    color: #06402B;
}

.why-us-icon--tilt i {
    transform: rotate(-12deg);
}

.why-us-content {
    text-align: right;
}

.why-us-item p {
    font-size: 0.9375rem; /* 15px - readable */
    font-weight: 700;
    color: #0b1f3b;
    line-height: 1.7; /* Improved readability */
    margin: 0;
    word-wrap: break-word;
    flex: 1;
}

/* Tablet and up */
@media (min-width: 768px) {
    #why-us {
        padding: 4rem 2rem;
    }

    #why-us h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .why-us-grid {
        gap: 1.5rem;
        width: min(760px, 100%);
    }

    .why-us-item {
        padding: 0.9rem 1.8rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    #why-us {
        padding: 5rem 2rem;
        max-width: var(--max-content-width); /* Constrain width */
    }

    #why-us h2 {
        font-size: 3rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
        margin-left: auto;
        margin-right: auto;
    }

    .why-us-grid {
        width: min(820px, 100%);
        max-width: 65ch; /* Optimal reading width */
        margin-left: auto;
        margin-right: auto;
    }

    .why-us-item {
        padding: 1rem 1.8rem; /* More padding on desktop */
    }

    .why-us-item p {
        font-size: 1rem; /* Larger on desktop */
    }

    .why-us-icon {
        width: 56px; /* Larger on desktop */
        height: 56px;
        min-width: 56px;
        min-height: 56px;
    }
}


/* Secondary CTA Section */
#cta-secondary {
    padding: 2.5rem 1rem; /* Reduced padding on mobile */
    background-color: #f0f4f8;
    text-align: center;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

#cta-secondary h2 {
    font-size: 1.75rem; /* Reduced for mobile */
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    line-height: 1.4;
    padding: 0 0.5rem;
    word-wrap: break-word;
}

#cta-secondary p {
    font-size: 1rem; /* 16px - readable */
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.7; /* Improved readability */
    padding: 0 0.5rem;
    word-wrap: break-word;
    max-width: 100%;
}

.cta-button {
    display: block;
    width: 100%;
    max-width: 100%; /* Full width on mobile */
    margin: 0 auto;
    background-color: #023020;
    color: #ffffff;
    padding: var(--button-padding-y) var(--button-padding-x);
    font-size: var(--button-font-size);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--button-radius);
    text-align: center;
    min-height: var(--button-min-height);
    min-width: 44px; /* Ensure minimum touch target */
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(2, 48, 32, 0.1);
}

.cta-button:hover {
    background-color: #034a2f;
    transform: translateY(-1px);
}

.cta-button:active {
    background-color: #012a1c;
    transform: translateY(0);
}

.cta-button:focus {
    outline: 2px solid #023020;
    outline-offset: 2px;
}

/* Tablet and up */
@media (min-width: 768px) {
    #cta-secondary {
        padding: 4rem 2rem;
    }

    #cta-secondary h2 {
        font-size: 2.5rem;
    }

    #cta-secondary p {
        font-size: 1.25rem;
        margin-bottom: 2.5rem;
    }

    .cta-button {
        display: inline-block;
        width: auto;
        max-width: var(--button-max-width);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    #cta-secondary {
        padding: 5rem 2rem;
        max-width: var(--max-content-width); /* Constrain width */
    }

    #cta-secondary h2 {
        font-size: 3rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
        margin-left: auto;
        margin-right: auto;
    }

    #cta-secondary p {
        font-size: 1.25rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
        margin-left: auto;
        margin-right: auto;
    }

    .cta-button {
        width: auto; /* Auto width on desktop */
        max-width: var(--button-max-width);
    }
}

/* Footer */
footer {
    background-color: #023020;
    color: #e8e8e8;
    padding: 2rem 1rem; /* Reduced padding on mobile */
    margin-top: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.footer-content {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Reduced gap on mobile */
    margin-bottom: 2rem;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 0 0.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 720px;
    gap: 0.75rem;
}

.footer-columns {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    align-items: center; /* Center on mobile */
    text-align: center; /* Center on mobile */
    justify-content: center;
    box-sizing: border-box;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-list a {
    color: #f2f6f4;
    text-decoration: none;
    font-weight: 400;
    transition: opacity 0.2s ease;
    display: block;
    padding: 0.5rem 0; /* Add padding for better touch targets */
    min-height: 44px; /* Minimum touch target */
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-list a:hover {
    opacity: 0.8;
}

.footer-list a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f2f6f4;
    font-size: 0.9375rem; /* 15px - readable */
    justify-content: center;
    padding: 0.5rem 0; /* Add padding for better touch targets */
    min-height: 44px; /* Minimum touch target */
    word-wrap: break-word;
    line-height: 1.6;
}

/* Clickable phone and email links: reset link styles, keep appearance */
a.footer-contact-item,
a.footer-contact-item--phone,
a.footer-contact-item--email {
    text-decoration: none;
    color: #f2f6f4;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

a.footer-contact-item:hover,
a.footer-contact-item--phone:hover,
a.footer-contact-item--email:hover {
    opacity: 0.9;
}

a.footer-contact-item:focus,
a.footer-contact-item--phone:focus,
a.footer-contact-item--email:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

.footer-contact-item i {
    color: #ffffff;
    font-size: 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.footer-social a {
    color: #f2f6f4;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    width: 44px; /* Minimum touch target */
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon-x {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: block;
}

.footer-social a:hover {
    opacity: 0.9;
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-social a:active {
    transform: scale(1.05);
}

.footer-social a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.footer-logo {
    width: 140px;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
    object-fit: contain;
}

.footer-description {
    font-size: 0.9375rem; /* 15px - readable */
    line-height: 1.7; /* Improved readability */
    margin: 0 0 1rem;
    color: #f2f6f4;
    font-weight: 400;
    word-wrap: break-word;
    max-width: 100%;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0.5rem 0;
    color: #f2f6f4;
    font-weight: 400;
}

.contact {
    color: #f2f6f4;
    font-size: 0.9rem;
    font-weight: 400;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: #b8b8b8;
    margin: 0;
}

/* Tablet and up */
@media (min-width: 768px) {
    footer {
        padding: 3rem 2rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        flex: 1;
    }

    .footer-logo {
        margin-left: 0;
        margin-right: 0;
    }

    .footer-columns {
        gap: 3rem;
    }
}

@media (max-width: 767px) {
    .footer-columns {
        gap: 1rem;
        flex-direction: column; /* Ensure vertical stacking */
    }

    .footer-title {
        font-size: 1rem;
    }

    .footer-list a,
    .footer-contact-item {
        font-size: 0.875rem; /* 14px - minimum readable */
        line-height: 1.6;
    }

    .footer-description {
        font-size: 0.875rem; /* 14px - minimum readable */
    }
}

/* Desktop */
@media (min-width: 1024px) {
    footer {
        padding: 3.5rem 2rem;
    }

    .footer-content {
        max-width: var(--max-content-width); /* Constrain width */
        flex-direction: row; /* Horizontal layout on desktop */
        align-items: flex-start;
        text-align: left;
        gap: 3rem;
    }

    .footer-brand {
        flex: 1;
        max-width: 400px;
        align-items: flex-start;
        text-align: left;
    }

    .footer-columns {
        flex-direction: row; /* Horizontal layout on desktop */
        gap: 3rem;
        align-items: flex-start;
        text-align: left;
        flex: 1;
    }

    .footer-description {
        font-size: 1rem;
        max-width: 65ch; /* Optimal reading width */
    }

    .footer-section {
        flex: 1;
    }

    .footer-section p {
        font-size: 0.9375rem;
        max-width: 65ch; /* Optimal reading width */
    }

    .footer-list a {
        justify-content: flex-start; /* Left align on desktop */
    }

    .footer-contact {
        align-items: flex-start;
        text-align: left;
    }

    .footer-contact-list {
        align-items: flex-start;
    }

    .footer-contact-item {
        justify-content: flex-start;
    }
}

/* About Page */
.about-section {
    padding: 2rem 1rem; /* Reduced padding on mobile */
    background-color: #ffffff;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Mortgage-Backed Financing Page */
.mortgage-page {
    padding: 0 0 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.personal-finance-page {
    padding: 0 0 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.personal-finance-hero {
    background-color: #f5f8f6;
    border-radius: 0;
    padding: 0;
    text-align: center;
    position: relative;
}

.personal-finance-hero .hero-image-container,
.mortgage-hero .hero-image-container {
    position: relative;
}

.personal-finance-hero .hero-text,
.mortgage-hero .hero-text {
    z-index: 2;
}

.personal-finance-hero .hero-image-container::after,
.mortgage-hero .hero-image-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
}

.personal-finance-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.personal-finance-hero p {
    font-size: 1.125rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.7;
}

.personal-finance-cta {
    align-self: center;
    margin-top: 0.5rem;
}

.personal-finance-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem; /* Reduced padding on mobile */
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Reduced gap on mobile */
    box-sizing: border-box;
}

.personal-finance-section {
    background-color: #ffffff;
    border-radius: 16px; /* Smaller radius on mobile */
    padding: 1.5rem 1rem; /* Reduced padding on mobile */
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.personal-finance-section h2 {
    font-size: 1.5rem; /* Reduced for mobile */
    font-weight: 700;
    color: #023020;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

.personal-finance-section p {
    font-size: 1rem; /* 16px - readable */
    color: #1a1a1a;
    margin: 0;
    line-height: 1.7; /* Improved readability */
    word-wrap: break-word;
}

.personal-finance-advantages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.personal-finance-advantage {
    background-color: #ffffff;
    border-radius: 999px;
    padding: 1rem 1rem; /* Reduced padding on mobile */
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 44px; /* Minimum touch target */
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.personal-finance-advantage:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.personal-finance-advantage:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.personal-finance-icon {
    width: 44px;
    height: 44px;
    min-width: 44px; /* Ensure minimum size */
    min-height: 44px;
    border-radius: 50%;
    background-color: rgba(2, 48, 32, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #023020;
    flex-shrink: 0;
}

.personal-finance-icon i {
    font-size: 1.2rem;
}

.personal-finance-advantage p {
    margin: 0;
    color: #1a1a1a;
    font-size: 0.9375rem; /* 15px - readable */
    line-height: 1.7; /* Improved readability */
    font-weight: 700;
    word-wrap: break-word;
    flex: 1;
}

.personal-finance-list,
.personal-finance-steps {
    margin: 0;
    padding-left: 1.5rem;
    padding-right: 0.5rem; /* Add right padding */
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Increased gap for better spacing */
    color: #1a1a1a;
    font-size: 1rem; /* 16px - readable */
    line-height: 1.7; /* Improved readability */
    word-wrap: break-word;
}

.personal-finance-steps {
    list-style: decimal;
}

.personal-finance-notice {
    background-color: #f6f8f7;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}

.personal-finance-cta-section {
    align-items: center;
    text-align: center;
}

.personal-finance-cta-section .personal-finance-cta {
    align-self: center;
}

@media (min-width: 768px) {
    .personal-finance-page {
        padding: 0 0 5rem;
        gap: 2.5rem;
    }

    .personal-finance-hero {
        padding: 0;
    }

    .personal-finance-container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .personal-finance-page {
        padding: 0 0 6rem;
    }

    .personal-finance-container {
        padding: 0 2rem;
        max-width: 900px; /* Constrain width */
    }

    .personal-finance-section {
        padding: 2.5rem 2.75rem;
        border-radius: 20px; /* Larger radius on desktop */
    }

    .personal-finance-section h2 {
        font-size: 2rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
    }

    .personal-finance-section p {
        font-size: 1.125rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
    }

    .personal-finance-advantage {
        padding: 1rem 1.5rem; /* More padding on desktop */
    }

    .personal-finance-advantage p {
        font-size: 1rem; /* Larger on desktop */
    }
}
.mortgage-hero {
    background-color: #f5f8f6;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    text-align: center;
    position: relative;
}

.mortgage-hero .mortgage-back-link {
    color: #ffffff;
}

.mortgage-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.mortgage-hero p {
    font-size: 1.125rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.7;
}

.mortgage-cta {
    align-self: center;
    margin-top: 0.5rem;
}

.mortgage-back-link {
    margin-top: 0.25rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease, transform 0.1s ease;
    display: inline-block;
    padding: 0.5rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mortgage-back-link:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    text-decoration: underline;
}

.mortgage-back-link:active {
    transform: translateY(0);
}

.mortgage-back-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

.mortgage-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem; /* Reduced padding on mobile */
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Reduced gap on mobile */
    box-sizing: border-box;
}

.mortgage-section {
    background-color: #ffffff;
    border-radius: 16px; /* Smaller radius on mobile */
    padding: 1.5rem 1rem; /* Reduced padding on mobile */
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mortgage-section h2 {
    font-size: 1.5rem; /* Reduced for mobile */
    font-weight: 700;
    color: #023020;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

.mortgage-section p {
    font-size: 1rem; /* 16px - readable */
    color: #1a1a1a;
    margin: 0;
    line-height: 1.7; /* Improved readability */
    word-wrap: break-word;
}

.mortgage-advantages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mortgage-advantage {
    background-color: #ffffff;
    border-radius: 999px;
    padding: 1rem 1rem; /* Reduced padding on mobile */
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 44px; /* Minimum touch target */
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mortgage-advantage:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.mortgage-advantage:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.mortgage-advantage-icon {
    width: 44px;
    height: 44px;
    min-width: 44px; /* Ensure minimum size */
    min-height: 44px;
    border-radius: 50%;
    background-color: rgba(2, 48, 32, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #023020;
    flex-shrink: 0;
}

.mortgage-advantage-icon i {
    font-size: 1.2rem;
}

.mortgage-advantage p {
    margin: 0;
    color: #1a1a1a;
    font-size: 0.9375rem; /* 15px - readable */
    line-height: 1.7; /* Improved readability */
    font-weight: 700;
    word-wrap: break-word;
    flex: 1;
}

.mortgage-notes {
    background-color: #f6f8f7;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}

.mortgage-cta-section {
    align-items: center;
    text-align: center;
}

.mortgage-cta-section .mortgage-cta {
    align-self: center;
}

.mortgage-list,
.mortgage-steps {
    margin: 0;
    padding-left: 1.5rem;
    padding-right: 0.5rem; /* Add right padding */
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Increased gap for better spacing */
    color: #1a1a1a;
    font-size: 1rem; /* 16px - readable */
    line-height: 1.7; /* Improved readability */
    word-wrap: break-word;
}

.mortgage-steps {
    list-style: decimal;
}

@media (min-width: 768px) {
    .mortgage-page {
        padding: 0 0 5rem;
        gap: 2.5rem;
    }

    .mortgage-hero {
        padding: 0;
    }

    .mortgage-section {
        padding: 2.5rem 2.75rem;
    }

    .mortgage-hero h1 {
        font-size: 3rem;
    }

    .mortgage-container {
        padding: 0 2rem;
    }
}

@media (min-width: 1024px) {
    .mortgage-page {
        padding: 0 0 6rem;
    }

    .mortgage-container {
        padding: 0 2rem;
        max-width: 900px; /* Constrain width */
    }

    .mortgage-section {
        padding: 2.5rem 2.75rem;
        border-radius: 20px; /* Larger radius on desktop */
    }

    .mortgage-section h2 {
        font-size: 2rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
    }

    .mortgage-section p {
        font-size: 1.125rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
    }

    .mortgage-advantage {
        padding: 1rem 1.5rem; /* More padding on desktop */
    }

    .mortgage-advantage p {
        font-size: 1rem; /* Larger on desktop */
    }
}

.about-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.about-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 2rem;
    border-radius: 16px; /* Smaller radius on mobile */
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    object-fit: cover;
    box-sizing: border-box;
    overflow: hidden; /* Prevent overflow */
}

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

.about-container h1 {
    font-size: 1.75rem; /* Reduced for mobile */
    font-weight: 600;
    color: #023020;
    text-align: center;
    margin: 0 0 2rem; /* Reduced spacing on mobile */
    line-height: 1.4;
    word-wrap: break-word;
    padding: 0 0.5rem;
}

.about-content {
    text-align: right;
    direction: rtl;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.about-content p {
    font-size: 1rem; /* 16px - readable */
    line-height: 1.7; /* Improved readability */
    color: #1a1a1a;
    margin: 0 0 1.5rem;
    word-wrap: break-word;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Tablet and up */
@media (min-width: 768px) {
    .about-section {
        padding: 4rem 2rem;
    }

    .about-container {
        max-width: 800px;
        padding: 0 1rem;
    }

    .about-container h1 {
        font-size: 3rem;
        margin-bottom: 3rem;
    }

    .about-content p {
        font-size: 1.25rem;
        margin-bottom: 2rem;
        max-width: 65ch; /* Optimal reading width */
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .about-section {
        padding: 5rem 2rem;
    }

    .about-container {
        max-width: 900px; /* Constrain width */
    }

    .about-container h1 {
        font-size: 3.5rem;
        max-width: 65ch; /* Optimal reading width */
        margin-left: auto;
        margin-right: auto;
    }

    .about-content {
        max-width: 65ch; /* Optimal reading width */
        margin: 0 auto;
    }

    .about-content p {
        font-size: 1.375rem; /* Larger on desktop */
        max-width: 65ch; /* Optimal reading width */
    }
}

@media (min-width: 1024px) {
    .footer-bottom {
        max-width: var(--max-content-width); /* Constrain width */
        margin-left: auto;
        margin-right: auto;
    }

    main {
        max-width: 100%;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* WhatsApp Floating Button */
.whatsapp-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem; /* 56px - above minimum touch target */
    height: 3.5rem;
    min-width: 44px; /* Ensure minimum touch target */
    min-height: 44px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: background-color 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: rgba(37, 211, 102, 0.2);
}

.whatsapp-button i {
    font-size: 1.75rem;
}

.whatsapp-button:hover {
    background-color: #20ba5a;
    transform: scale(1.05);
}

.whatsapp-button:active {
    background-color: #1fa350;
    transform: scale(0.95);
}

.whatsapp-button:focus {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

/* Tablet and up */
@media (min-width: 768px) {
    .whatsapp-button {
        bottom: 2rem;
        right: 2rem;
        width: 4rem;
        height: 4rem;
    }

    .whatsapp-button i {
        font-size: 2rem;
    }
}
