html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

body {
    background: #f8fafc;
    color: #222;
}

section[id] {
    scroll-margin-top: 90px;
}

form#apply {
    scroll-margin-top: 110px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(4, 34, 75, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: #04224b;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-group {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    text-decoration: none;
    color: #0a1a33;
    font-weight: 500;
    font-size: 0.98rem;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: #0070c9;
}

.nav-cta {
    background: linear-gradient(90deg, #0070c9, #00a4db);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    border: 0;
    background: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.nav-toggle .bar {
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: #04224b;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-header.nav-open .nav-toggle .bar:nth-child(2) {
    opacity: 0;
}

.site-header.nav-open .nav-toggle .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.site-header.nav-open .nav-toggle .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 1024px) {
    .header-inner {
        padding: 16px 24px;
    }
}

@media (max-width: 960px) {
    .header-inner {
        gap: 16px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-group {
        position: absolute;
        top: calc(100% + 12px);
        right: 24px;
        left: 24px;
        background: #ffffff;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 18px 40px rgba(4, 34, 75, 0.16);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        z-index: 1000;
        transition: 0.3s ease;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .nav-links a {
        width: 100%;
    }

    .nav-cta {
        display: inline-flex;
        justify-content: center;
        width: 100%;
    }

    .site-header.nav-open .nav-group {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #f9fbff 0%, #ecf5ff 100%);
    padding: 70px 5% 90px;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    grid-template-areas:
        "copy form"
        "copy visual";
    gap: 45px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero-copy {
    grid-area: copy;
    max-width: 520px;
}

.subtag {
    color: #0086d1;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-copy h1 {
    font-size: 2.8rem;
    color: #04224b;
    margin: 15px 0;
    line-height: 1.2;
}

.hero-copy p {
    font-size: 1.05rem;
    max-width: 520px;
    line-height: 1.6;
    color: #444;
}

.hero-points {
    list-style: none;
    margin: 25px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    color: #1f2d45;
    font-weight: 500;
    justify-items: start;
}

.cta-group {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(90deg, #0070c9, #00a4db);
    color: white;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.help {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333;
}

.help img {
    width: 28px;
}

/* ===== FORM CARD ===== */
.hero-form {
    grid-area: form;
    max-width: 420px;
    justify-self: end;
    width: 100%;
}

.hero-visual {
    grid-area: visual;
    align-self: stretch;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apply-box {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.apply-header {
    text-align: center;
    background: linear-gradient(90deg, #0070c9, #00a4db);
    color: white;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.apply-header h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 10px;
    color: #333;
}

form input,
form select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
}

form button {
    margin-top: 18px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    background: linear-gradient(90deg, #0070c9, #00a4db);
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

form button:hover {
    opacity: 0.9;
}

.note {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
}

/* ===== TRUST ===== */
.trust {
    background: linear-gradient(120deg, rgba(0, 112, 201, 0.12), rgba(0, 164, 219, 0.05));
    padding: 90px 5%;
}

.trust-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 50px;
    max-width: 1180px;
    margin: 0 auto;
    align-items: center;
}

.trust-media img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(4, 34, 75, 0.18);
    object-fit: cover;
}

.trust-info h2 {
    color: #04224b;
    font-size: 2.1rem;
    margin-bottom: 20px;
}

.trust-info p {
    color: #1f2d45;
    line-height: 1.7;
    margin-bottom: 30px;
}

.trust-info {
    text-align: left;
}

.trust-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
}

.stat {
    background: #fff;
    border-radius: 14px;
    padding: 16px 24px;
    box-shadow: 0 10px 24px rgba(4, 34, 75, 0.1);
    min-width: 160px;
}

.stat strong {
    display: block;
    font-size: 1.6rem;
    color: #0070c9;
}

.stat span {
    color: #1f2d45;
    font-size: 0.95rem;
}

.partners {
    display: flex;
    align-items: center;
    gap: 35px;
    flex-wrap: wrap;
}

.partners img {
    width: 60px;
    opacity: 0.85;
}

/* ===== FEATURE SHOWCASE ===== */
.feature-showcase {
    padding: 90px 5%;
    background: #fff;
}

.feature-intro {
    max-width: 720px;
    margin: 0 auto 50px;
    text-align: center;
}

.feature-intro h2 {
    color: #04224b;
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-intro p {
    color: #44516a;
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(4, 34, 75, 0.08);
    display: flex;
    flex-direction: column;
}

.feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.feature-content {
    padding: 25px;
}

.feature-content h3 {
    color: #0070c9;
    margin-bottom: 10px;
}

.feature-content p {
    color: #44516a;
    line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    padding: 90px 5%;
    background: #eef7ff;
}

.how-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
    max-width: 1180px;
    margin: 0 auto;
    align-items: center;
}

.how-steps h2 {
    color: #04224b;
    font-size: 2rem;
    margin-bottom: 25px;
}

.how-steps .step {
    display: grid;
    grid-template-columns: 48px auto;
    gap: 18px;
    align-items: start;
    background: #fff;
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 12px 28px rgba(4, 34, 75, 0.08);
    margin-bottom: 18px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #0070c9, #00a4db);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.how-steps h3 {
    color: #04224b;
    margin-bottom: 8px;
}

.how-steps p {
    color: #44516a;
    line-height: 1.6;
    font-size: 0.95rem;
}

.how-media img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 35px rgba(4, 34, 75, 0.12);
    object-fit: cover;
}

/* ===== BENEFITS ===== */
.loan-benefits {
    padding: 90px 5%;
    background: #fff;
}

.benefits-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1180px;
    margin: 0 auto;
    align-items: start;
}

.benefits-text h2 {
    color: #04224b;
    margin-bottom: 20px;
}

.benefits-text p {
    color: #444;
    margin-bottom: 25px;
    line-height: 1.7;
}

.benefit-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    gap: 14px;
}

.benefit-list li {
    color: #1f2d45;
    line-height: 1.6;
}

.benefit-list strong {
    color: #0070c9;
}

.benefits-visual {
    position: relative;
}

.benefits-visual::before {
    content: "";
    position: absolute;
    inset: 25px -25px -25px 25px;
    background: linear-gradient(135deg, rgba(0, 112, 201, 0.08), rgba(0, 164, 219, 0.16));
    border-radius: 24px;
    z-index: 0;
}

.benefits-visual img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 112, 201, 0.25);
    object-fit: cover;
}

/* ===== FAQ ===== */
.faq {
    padding: 90px 5%;
    background: #f8fafc;
}

.faq-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 45px;
    max-width: 1180px;
    margin: 0 auto;
    align-items: center;
}

.faq-media img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 35px rgba(4, 34, 75, 0.12);
    object-fit: cover;
}

.faq-content h2 {
    color: #04224b;
    font-size: 2rem;
    margin-bottom: 20px;
}

.faq-item {
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 12px 30px rgba(4, 34, 75, 0.08);
    margin-bottom: 18px;
}

.faq-item h3 {
    color: #0070c9;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.faq-item p {
    color: #44516a;
    line-height: 1.7;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    position: relative;
    padding: 110px 5%;
    background: url("assets/loan-bg.jpg") center/cover no-repeat;
    overflow: hidden;
}

.testimonial-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 34, 75, 0.72);
}

.testimonials-inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}

.testimonials-inner h2 {
    font-size: 2.1rem;
    margin-bottom: 45px;
}

.testimonial-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 30px 28px;
    backdrop-filter: blur(6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.testimonial-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 18px;
    border: 3px solid rgba(255, 255, 255, 0.6);
}

.testimonial-card blockquote {
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 18px;
}

.testimonial-card span {
    font-weight: 600;
    color: #e1f3ff;
}

/* ===== CTA ===== */
.final-cta {
    background: linear-gradient(115deg, #0070c9, #00a4db);
    color: white;
    padding: 90px 5%;
}

.cta-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.6fr);
    align-items: center;
    gap: 40px;
    max-width: 1180px;
    margin: 0 auto;
}

.cta-copy {
    text-align: left;
}

.cta-copy h2 {
    font-size: 2.1rem;
    margin-bottom: 12px;
}

.cta-copy p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 420px;
}

.cta-btn {
    display: inline-block;
    background: white;
    color: #0070c9;
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.cta-btn:hover {
    background: #f2f2f2;
}

.cta-visual img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

/* ===== LEGAL PAGES ===== */
.legal-topbar {
    background: #ffffff;
    border-bottom: 1px solid rgba(4, 34, 75, 0.08);
    padding: 20px 5%;
}

.legal-topbar-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0070c9;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(0, 112, 201, 0.3);
    border-radius: 999px;
    padding: 10px 18px;
    transition: background 0.2s ease, color 0.2s ease;
}

.back-link:hover,
.back-link:focus {
    background: rgba(0, 112, 201, 0.08);
    color: #005b94;
}

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 5% 80px;
    display: flex;
    flex-direction: column;
    gap: 38px;
}

.legal-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 40px 45px;
    box-shadow: 0 18px 45px rgba(15, 35, 67, 0.08);
    border: 1px solid rgba(4, 34, 75, 0.06);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.legal-card h1 {
    font-size: 2.1rem;
    color: #04224b;
    margin-bottom: 10px;
}

.legal-card h2 {
    font-size: 1.4rem;
    color: #0a1a33;
    margin-top: 18px;
}

.legal-card p,
.legal-card li {
    line-height: 1.7;
    color: #334155;
    font-size: 1rem;
}

.legal-card ul {
    padding-left: 1.2rem;
    display: grid;
    gap: 10px;
}

.legal-card strong {
    color: #04224b;
}

/* ===== FOOTER ===== */
footer {
    background: #0a1a33;
    color: #bbb;
    text-align: center;
    padding: 25px 10px;
    font-size: 0.9rem;
}

footer a {
    color: #bbb;
    text-decoration: none;
    margin: 0 4px;
}

footer a:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
    .hero-wrapper {
        grid-template-areas:
            "copy"
            "form"
            "visual";
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-copy {
        justify-self: center;
    }

    .hero-points {
        justify-items: center;
    }

    .hero-form {
        justify-self: center;
        width: 100%;
    }

    .hero-visual {
        max-width: 480px;
        justify-self: center;
    }

    .trust-layout,
    .how-layout,
    .benefits-content,
    .faq-layout,
    .cta-wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .trust-stats {
        justify-content: center;
    }

    .trust-media img,
    .how-media img,
    .benefits-visual img {
        max-width: 520px;
        margin: 0 auto;
    }

    .how-media {
        order: -1;
    }

    .faq-media {
        order: -1;
    }

    .cta-visual {
        justify-self: center;
        margin-top: 25px;
    }

    .legal-card {
        padding: 32px;
    }
}

@media (max-width: 720px) {
    .legal-topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .back-link {
        width: 100%;
        justify-content: center;
    }

    .legal-card h1 {
        font-size: 1.85rem;
    }
}

@media (max-width: 680px) {
    .hero-wrapper {
        grid-template-areas:
            "copy"
            "form"
            "visual";
    }

    .hero-form {
        justify-self: center;
    }

    .hero-visual {
        margin-top: 10px;
    }

    .benefits-visual::before {
        inset: 15px -15px -15px 15px;
    }

    .legal-page {
        padding: 45px 5% 60px;
    }

    .legal-card {
        padding: 26px;
    }
}
