/* ============================================================
   app.css — Agricultural Bank Platform
   Clean, professional, modern. No gimmicks.
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green:        #1a5c38;
    --green-dark:   #0f3d25;
    --green-mid:    #2e7d52;
    --green-light:  #e8f5ee;
    --green-border: #b7dfc8;
    --gold:         #c8993a;
    --gold-light:   #fdf5e6;
    --text:         #1a1f2e;
    --text-mid:     #4b5563;
    --text-light:   #6b7280;
    --border:       #e5e7eb;
    --bg:           #ffffff;
    --bg-tint:      #f8faf9;
    --radius:       10px;
    --shadow:       0 2px 16px rgba(0,0,0,0.08);
    --shadow-lg:    0 8px 40px rgba(0,0,0,0.12);
    --transition:   0.2s ease;
    --font:         'Inter', system-ui, -apple-system, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; }
img  { max-width: 100%; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
h1,h2,h3,h4,h5 { line-height: 1.25; font-weight: 700; }

/* ── Layout ───────────────────────────────────────────────── */
.wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}
.section      { padding: 88px 0; }
.section-tinted { background: var(--bg-tint); }

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--text);
    margin-bottom: 14px;
}
.section-head p {
    color: var(--text-mid);
    font-size: 1.05rem;
    line-height: 1.7;
}
.section-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-light);
    border: 1px solid var(--green-border);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 14px;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.nav-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 40px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.nav-logo-img { height: 36px; width: auto; }
.nav-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--green-dark);
    letter-spacing: -0.02em;
}
.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}
.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: background var(--transition), color var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    background: var(--green-light);
    color: var(--green-dark);
}
.nav-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.btn-nav-outline {
    padding: 9px 18px;
    border-radius: var(--radius);
    border: 1.5px solid var(--green);
    color: var(--green);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-nav-outline:hover { background: var(--green); color: #fff; }
.btn-nav-solid {
    padding: 9px 18px;
    border-radius: var(--radius);
    background: var(--green);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background var(--transition);
    white-space: nowrap;
}
.btn-nav-solid:hover { background: var(--green-dark); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.nav-mobile { display: none; border-top: 1px solid var(--border); background: #fff; }
.nav-mobile ul { padding: 12px 16px; }
.nav-mobile ul a { display: block; padding: 12px 8px; font-size: 1rem; color: var(--text-mid); border-bottom: 1px solid var(--border); }
.nav-mobile.open { display: block; }

/* ── Flash messages ───────────────────────────────────────── */
.flash-stack {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.flash-item {
    padding: 14px 40px 14px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    box-shadow: var(--shadow);
}
.flash-item button {
    position: absolute;
    top: 8px; right: 12px;
    background: none; border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
}
.flash-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.flash-danger  { background: #fee2e2; color: #7f1d1d; border-left: 4px solid #ef4444; }
.flash-warning { background: #fef3c7; color: #78350f; border-left: 4px solid #f59e0b; }
.flash-info    { background: #dbeafe; color: #1e3a8a; border-left: 4px solid #3b82f6; }

/* also support class name alert- for compatibility */
.alert-success { background:#d1fae5;color:#065f46;border-left:4px solid #10b981;padding:14px;border-radius:var(--radius);margin-bottom:16px; }
.alert-danger  { background:#fee2e2;color:#7f1d1d;border-left:4px solid #ef4444;padding:14px;border-radius:var(--radius);margin-bottom:16px; }
.alert-warning { background:#fef3c7;color:#78350f;border-left:4px solid #f59e0b;padding:14px;border-radius:var(--radius);margin-bottom:16px; }
.alert-info    { background:#dbeafe;color:#1e3a8a;border-left:4px solid #3b82f6;padding:14px;border-radius:var(--radius);margin-bottom:16px; }

/* ── Buttons (generic) ────────────────────────────────────── */
.btn-primary-solid {
    display: inline-block;
    background: var(--green);
    color: #fff;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary-solid:hover { background: var(--green-dark); }
.btn-card {
    display: inline-block;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
    margin-top: 16px;
}
.btn-card:hover { background: var(--green); color: #fff; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    padding-top: 68px; /* navbar height */
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(10, 35, 20, 0.88) 0%,
        rgba(10, 35, 20, 0.70) 50%,
        rgba(10, 35, 20, 0.30) 100%
    );
}
.hero-body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
}
.hero-content {
    max-width: 1160px;
    margin: 0 auto;
    padding: 64px 24px;
    max-width: 620px;
    padding-left: max(24px, calc((100vw - 1160px) / 2 + 24px));
}
.hero-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #86efac;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: #86efac;
    font-weight: 500;
    margin-bottom: 16px;
}
.hero-text {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 520px;
}
.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.btn-hero-primary {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    padding: 15px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
}
.btn-hero-primary:hover { background: #a07828; transform: translateY(-1px); }
.btn-hero-secondary {
    display: inline-block;
    background: transparent;
    color: #fff;
    padding: 15px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.5);
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-hero-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

.hero-stats-bar {
    position: relative;
    z-index: 1;
    background: var(--green-dark);
    display: flex;
    justify-content: center;
}
.hero-stat {
    flex: 1;
    max-width: 290px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.1);
    gap: 4px;
}
.hero-stat:last-child { border-right: none; }
.hero-stat strong {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.hero-stat span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Loan cards ───────────────────────────────────────────── */
.loan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.loan-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.loan-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.loan-card-img { height: 180px; overflow: hidden; }
.loan-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.loan-card:hover .loan-card-img img { transform: scale(1.04); }
.loan-card-body { padding: 24px; }
.loan-card-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.loan-card-body p  { font-size: 0.875rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 16px; }
.loan-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: var(--bg-tint);
    border-radius: 8px;
    margin-bottom: 4px;
}
.loan-card-meta > div { display: flex; justify-content: space-between; align-items: center; }
.loan-card-meta span  { font-size: 0.78rem; color: var(--text-light); }
.loan-card-meta strong{ font-size: 0.875rem; font-weight: 700; color: var(--green-dark); }

/* ── Two-col section ──────────────────────────────────────── */
.two-col-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
.two-col-img { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.two-col-img img { width: 100%; height: 480px; object-fit: cover; }
.two-col-text .section-tag { margin-bottom: 12px; }
.two-col-text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--text);
    margin-bottom: 16px;
}
.two-col-text > p { color: var(--text-mid); line-height: 1.75; margin-bottom: 32px; }

.feature-list { display: flex; flex-direction: column; gap: 22px; margin-bottom: 36px; }
.feature-list li { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon-box {
    width: 32px;
    height: 32px;
    background: var(--green);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.feature-list strong { display: block; font-size: 0.975rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.feature-list p { font-size: 0.875rem; color: var(--text-mid); line-height: 1.6; }

/* ── Steps ────────────────────────────────────────────────── */
.steps-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}
.steps-row::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--green-border);
    z-index: 0;
}
.step-item {
    text-align: center;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}
.step-num {
    width: 56px;
    height: 56px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    margin: 0 auto 20px;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px var(--green);
}
.step-item h4 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.step-item p  { font-size: 0.85rem; color: var(--text-mid); line-height: 1.65; }

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}
.cta-banner-bg {
    position: absolute;
    inset: 0;
}
.cta-banner-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cta-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,35,20,0.92) 0%, rgba(10,35,20,0.75) 100%);
}
.cta-banner-body {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}
.cta-banner-body h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 16px;
}
.cta-banner-body p {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto 36px;
    line-height: 1.7;
}
.cta-banner-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.75);
    padding: 64px 0 0;
}
.footer-container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.footer-tagline { font-size: 0.85rem; color: #86efac; margin-bottom: 14px; }
.footer-desc    { font-size: 0.85rem; line-height: 1.7; margin-bottom: 20px; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.footer-contact a { color: rgba(255,255,255,0.6); }
.footer-contact a:hover { color: #fff; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Auth pages (login, register, etc.) ───────────────────── */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 88px 16px 40px;
    background: var(--bg-tint);
}
.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.auth-card .auth-sub { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(26,92,56,0.1);
}
.form-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 5px; }
.btn-block {
    width: 100%;
    padding: 13px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: background var(--transition);
    display: block;
    text-align: center;
}
.btn-block:hover { background: var(--green-dark); }
.auth-footer { text-align: center; font-size: 0.875rem; color: var(--text-mid); margin-top: 20px; }
.auth-footer a { color: var(--green); font-weight: 600; }

/* ── Static pages (about, loans, contact) ─────────────────── */
.page-hero {
    padding: 140px 24px 64px;
    background: var(--green-dark);
    color: #fff;
    text-align: center;
}
.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 12px;
}
.page-hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; }

.content-section { padding: 72px 24px; max-width: 1160px; margin: 0 auto; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.content-grid h2 { font-family:var(--font-display); font-size: 1.6rem; color:var(--text); margin-bottom:14px; }
.content-grid p  { color: var(--text-mid); line-height:1.75; margin-bottom:16px; }

.loan-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.loan-list-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.loan-list-card img { width:100%; height:160px; object-fit:cover; }
.loan-list-card-body { padding:24px; }
.loan-list-card h3 { font-size:1.05rem; font-weight:700; margin-bottom:10px; }
.loan-list-card p  { font-size:0.875rem; color:var(--text-mid); line-height:1.6; margin-bottom:16px; }
.loan-detail-table { width:100%; border-collapse:collapse; margin-bottom:16px; }
.loan-detail-table td { padding:8px 0; font-size:0.875rem; border-bottom:1px solid var(--border); }
.loan-detail-table td:first-child { color:var(--text-light); }
.loan-detail-table td:last-child { font-weight:700; color:var(--green-dark); text-align:right; }

.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:start; }
.contact-info-list { display:flex; flex-direction:column; gap:24px; }
.contact-info-item { display:flex; gap:16px; align-items:flex-start; }
.contact-info-icon { width:44px; height:44px; background:var(--green-light); border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex-shrink:0; }
.contact-info-item strong { display:block; font-size:0.875rem; font-weight:700; color:var(--text); margin-bottom:3px; }
.contact-info-item p,
.contact-info-item a { font-size:0.9rem; color:var(--text-mid); }
.contact-info-item a:hover { color:var(--green); }

.about-values { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:24px; }
.value-card { background:var(--green-light); border:1px solid var(--green-border); border-radius:12px; padding:20px; }
.value-card h4 { font-size:0.95rem; font-weight:700; color:var(--green-dark); margin-bottom:6px; }
.value-card p  { font-size:0.84rem; color:var(--text-mid); line-height:1.6; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .two-col-section { grid-template-columns:1fr; gap:40px; }
    .two-col-img img { height:320px; }
    .footer-grid { grid-template-columns:1fr 1fr; gap:32px; }
    .steps-row { grid-template-columns:repeat(2,1fr); gap:32px; }
    .steps-row::before { display:none; }
    .content-grid { grid-template-columns:1fr; }
    .contact-grid { grid-template-columns:1fr; }
}
@media (max-width: 768px) {
    .nav-links, .nav-actions { display:none; }
    .nav-toggle { display:flex; margin-left:auto; }
    .hero { min-height:80vh; }
    .hero-stats-bar { flex-wrap:wrap; }
    .hero-stat { width:50%; border-bottom:1px solid rgba(255,255,255,0.1); }
    .loan-grid { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; }
    .about-values { grid-template-columns:1fr; }
    .steps-row { grid-template-columns:1fr; }
    .section { padding:56px 0; }
}
@media (max-width: 480px) {
    .auth-card { padding:28px 20px; }
    .hero-cta { flex-direction:column; }
    .btn-hero-primary, .btn-hero-secondary { width:100%; text-align:center; }
}