/* =========================================================
   LoanNext — Global Stylesheet
   Design: Navy/Green identity — "Your Next Step to Better Financing"
   Font: Poppins (Bold/SemiBold/Regular)
   Colors: #081D3A, #102A54, #28A745, #6CC96C, #F5F7FA
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --navy:       #081D3A;
    --navy-deep:  #060F20;
    --navy-light: #102A54;
    --green:      #28A745;
    --green-light:#6CC96C;
    --green-dark: #1e8035;
    --paper:      #F5F7FA;
    --paper-dim:  #EBF0F5;
    --white:      #FFFFFF;
    --ink:        #1A2332;
    --slate:      #5B6678;
    --line:       #DDE4ED;
    --line-dark:  rgba(255,255,255,0.10);
    --success:    #28A745;
    --danger:     #C0392B;
    --gold:       #6CC96C;
    --gold-dark:  #28A745;

    --font-display: 'Poppins', -apple-system, sans-serif;
    --font-body:    'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'Courier New', monospace;

    --radius:    6px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 4px rgba(8,29,58,0.08);
    --shadow-md: 0 8px 28px rgba(8,29,58,0.13);
    --shadow-lg: 0 20px 56px rgba(8,29,58,0.18);
    --container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy);
    line-height: 1.15;
    font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { color: var(--slate); }

.eyebrow {
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 14px; font-size: 1.05rem; }

.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    font-family: var(--font-body);
}
.btn-gold, .btn-green {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}
.btn-gold:hover, .btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn-navy {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-light); border-color: var(--navy-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--navy);
}
.btn-ghost:hover { border-color: var(--navy); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */

.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 0 rgba(255,255,255,0.06);
}
.topbar {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}
.topbar a { color: rgba(255,255,255,0.8); }
.topbar a:hover { color: var(--green-light); }
.topbar-links { display: flex; gap: 20px; }

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}
.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--white);
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.logo span { color: var(--green-light); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: var(--green-light);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta a.login-link { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    padding: 4px;
}

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--navy-deep);
    padding: 16px 24px 24px;
    border-top: 1px solid var(--line-dark);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-dark);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--green-light); }

@media (max-width: 920px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .topbar-links { display: none; }
    .nav-cta { display: none; }
}

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(135deg, var(--navy) 60%, var(--navy-light) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding: 72px 0 0;
}
.hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -80px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(40,167,69,0.18), transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: -60px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,201,108,0.10), transparent 70%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero h1 { color: var(--white); }
.hero h1 em { color: var(--green-light); font-style: normal; }
.hero p.lead {
    color: rgba(255,255,255,0.75);
    font-size: 1.08rem;
    max-width: 480px;
    margin: 20px 0 32px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 56px; flex-wrap: wrap; }

/* Trust badges row */
.trust-badges {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}
.trust-badge .icon { color: var(--green-light); font-size: 1rem; }

/* Ledger strip */
.ledger-strip { display: flex; border-top: 1px solid var(--line-dark); }
.ledger-item { flex: 1; padding: 22px 24px; border-right: 1px solid var(--line-dark); }
.ledger-item:last-child { border-right: none; }
.ledger-value { font-size: 1.5rem; font-weight: 700; color: var(--green-light); display: block; }
.ledger-label { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-top: 4px; }
.ledger-strip.on-paper { border-top: 1px solid var(--line); background: var(--white); }
.ledger-strip.on-paper .ledger-item { border-right: 1px solid var(--line); }
.ledger-strip.on-paper .ledger-value { color: var(--navy); }
.ledger-strip.on-paper .ledger-label { color: var(--slate); }

/* Hero rate card */
.rate-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}
.rate-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.rate-card-head .tag {
    background: rgba(40,167,69,0.12);
    color: var(--green-dark);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.rate-row {
    display: flex;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.rate-row:last-of-type { border-bottom: none; }
.rate-row .label { color: var(--slate); }
.rate-row .value { font-weight: 600; color: var(--navy); }
.rate-card .big-number { font-size: 2.5rem; font-weight: 800; color: var(--navy); margin: 8px 0 2px; }

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,0.68); }
.bg-paper-dim { background: var(--paper-dim); }
.bg-white { background: var(--white); }

/* ---------- Loan type cards ---------- */

.loan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.loan-card {
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.loan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green-light); }
.loan-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(40,167,69,0.10);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    color: var(--green);
    font-size: 1.4rem;
}
.loan-card h3 { margin-bottom: 6px; }
.loan-rate { font-size: 1.7rem; font-weight: 700; color: var(--green-dark); margin: 14px 0; }
.loan-rate span { font-size: 0.95rem; color: var(--slate); font-weight: 400; }
.loan-card p.desc { font-size: 0.92rem; margin-bottom: 20px; min-height: 64px; }
.loan-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--slate);
}

/* ---------- Steps ---------- */

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-card { position: relative; padding-left: 4px; }
.step-num {
    font-size: 0.82rem;
    color: var(--green);
    font-weight: 700;
    margin-bottom: 14px;
    display: block;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.step-card h4 { margin-bottom: 8px; }
.step-card p { font-size: 0.92rem; }

/* ---------- EMI Calculator ---------- */

.calc-panel {
    background: var(--navy);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    color: var(--white);
}
.calc-field { margin-bottom: 28px; }
.calc-field label { display: flex; justify-content: space-between; font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-bottom: 10px; }
.calc-field .out { color: var(--green-light); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--green-light); height: 4px; }
.calc-results { background: rgba(255,255,255,0.06); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 28px; }
.calc-result-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line-dark); font-size: 0.9rem; }
.calc-result-row:last-child { border-bottom: none; }
.calc-result-row .value { font-weight: 700; color: var(--green-light); }
.calc-result-row.primary .value { font-size: 1.4rem; }

@media (max-width: 860px) { .calc-panel { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */

.testi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.testi-card { background: rgba(255,255,255,0.05); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); padding: 30px; }
.testi-quote { font-size: 2.2rem; color: var(--green-light); line-height: 1; margin-bottom: 12px; }
.testi-card p.msg { color: rgba(255,255,255,0.78); font-size: 0.96rem; margin-bottom: 20px; }
.testi-person { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--green);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.testi-person .name { color: var(--white); font-weight: 600; font-size: 0.92rem; }
.testi-person .title { color: rgba(255,255,255,0.55); font-size: 0.82rem; }

/* ---------- Blog ---------- */

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1.5px solid var(--line); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-img {
    height: 170px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}
.blog-body { padding: 24px; }
.blog-date { font-size: 0.76rem; color: var(--green-dark); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.blog-body h4 { margin: 10px 0; line-height: 1.3; }
.blog-body p { font-size: 0.9rem; }
.blog-body .read-more { display: inline-block; margin-top: 14px; font-size: 0.85rem; font-weight: 700; color: var(--green-dark); border-bottom: 2px solid var(--green-light); }

/* ---------- CTA banner ---------- */

.cta-banner {
    background: linear-gradient(120deg, var(--navy), var(--navy-light));
    border-radius: var(--radius-lg);
    padding: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    gap: 24px;
    flex-wrap: wrap;
    border: 1px solid rgba(108,201,108,0.2);
}
.cta-banner h2 { color: var(--white); margin-bottom: 6px; }
.cta-banner p { color: rgba(255,255,255,0.7); }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.6); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; }
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 18px; }
.footer-grid ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid ul a:hover { color: var(--green-light); }
.footer-about p { color: rgba(255,255,255,0.55); font-size: 0.9rem; margin: 16px 0 20px; max-width: 280px; }
.footer-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--white); }
.footer-logo span { color: var(--green-light); }
.social-row { display: flex; gap: 10px; }
.social-row a {
    width: 36px; height: 36px;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
}
.social-row a:hover { background: var(--green); color: var(--white); border-color: var(--green); }
.footer-bottom { border-top: 1px solid var(--line-dark); padding: 22px 0; display: flex; justify-content: space-between; font-size: 0.82rem; flex-wrap: wrap; gap: 10px; }

/* ---------- Forms ---------- */

.form-shell {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}
.form-shell.wide { max-width: 800px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
.form-group .hint { font-size: 0.78rem; color: var(--slate); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s;
    font-family: var(--font-body);
}
.form-control:focus { border-color: var(--green); outline: none; background: var(--white); box-shadow: 0 0 0 3px rgba(40,167,69,0.12); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6678' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    border-bottom: 2px solid var(--green);
    padding-bottom: 8px;
    margin: 28px 0 18px;
}

.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 20px; }
.alert-success { background: rgba(40,167,69,0.1); color: var(--green-dark); border: 1px solid rgba(40,167,69,0.3); }
.alert-error { background: rgba(192,57,43,0.08); color: var(--danger); border: 1px solid rgba(192,57,43,0.22); }

.auth-meta { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--slate); }
.auth-meta a { color: var(--green-dark); font-weight: 700; border-bottom: 1.5px solid var(--green-light); }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-pending  { background: rgba(255,193,7,0.14); color: #856404; }
.badge-approved { background: rgba(40,167,69,0.12); color: var(--green-dark); }
.badge-rejected { background: rgba(192,57,43,0.10); color: var(--danger); }
.badge-active   { background: rgba(16,42,84,0.10); color: var(--navy-light); }
.badge-completed{ background: rgba(40,167,69,0.12); color: var(--green-dark); }
.badge-due      { background: rgba(255,193,7,0.18); color: #856404; }

/* ---------- Page header ---------- */

.page-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white);
    padding: 56px 0;
    text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 10px; }
.page-header .crumbs { color: rgba(255,255,255,0.55); font-size: 0.88rem; }
.page-header .crumbs a:hover { color: var(--green-light); }

/* ---------- Misc ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.divider { height: 1px; background: var(--line); margin: 48px 0; }
.tag-pill { display: inline-block; background: rgba(40,167,69,0.10); color: var(--green-dark); font-size: 0.78rem; padding: 5px 12px; border-radius: 20px; font-weight: 600; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .loan-grid, .steps-grid, .testi-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero { padding-bottom: 0; }
}
@media (max-width: 640px) {
    .loan-grid, .steps-grid, .testi-grid, .blog-grid, .footer-grid { grid-template-columns: 1fr; }
    .ledger-strip { flex-wrap: wrap; }
    .ledger-item { flex: 1 1 50%; border-bottom: 1px solid var(--line-dark); }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .calc-panel { padding: 24px; }
    .cta-banner { padding: 32px; text-align: center; justify-content: center; }
    .section { padding: 56px 0; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}
