/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0EA5E9;
    --primary-green: #10B981;
    --primary-yellow: #FACC15;
    --dark: #1E293B;
    --light: #F8FAFC;
    --gray: #64748B;
    --border: #E2E8F0;
}

html,
body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.6;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.logo-image {
    height: 42px;
    width: auto;
    display: block;
}

.logo-icon {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-blue);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: #0284C7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Hero Sections */
.hero {
    padding: 4rem 0 0;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
}

.hero .container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 1.25rem;
    flex-direction: row-reverse;
}

.hero-image {
    flex: 0 0 auto;
    max-height: 700px;
    width: auto;
    object-fit: contain;
    align-self: flex-end;
    position: relative;
    z-index: 2;
    transform: translateY(0);
}

.hero-content {
    flex: 1;
    width: min(100%, 700px);
    max-width: 700px;
    padding-left: 1.5rem;
    padding-right: 0;
    margin-right: -6.5rem;
    transform: translate(20%, -10%);
    position: relative;
    z-index: 1;
    text-align: center;
    color: #ffffff;
}

.hero-actions .btn {
    min-width: 200px;
    width: 220px;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.hero-image {
    flex: 0 0 auto;
    max-height: 700px;
    width: auto;
    object-fit: contain;
    align-self: flex-end;
    position: relative;
    z-index: 2;
    transform: translateY(0);
}

.hero-actions .btn {
    min-width: 170px;
}

.hero-blue {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(2, 132, 199, 0.2)), url("assets/images/loan2.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.05;
    text-align: left;
    max-width: 620px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-align: left;
    max-width: 520px;
    width: min(100%, 520px);
    color: #ffffff;
    flex-wrap: wrap;
}

.stat {
    text-align: left;
    white-space: nowrap;
}

.stat-value {
    white-space: nowrap;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: #ffffff;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    color: #ffffff;
}

.calculator-wrapper {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: var(--gray);
    font-size: 1.125rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* Calculator Inputs */
.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.amount-buttons,
.term-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.amount-btn,
.term-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    min-width: 80px;
}

.amount-btn:hover,
.term-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.amount-btn.active,
.term-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.term-btn small {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    opacity: 0.8;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.input-value {
    margin-top: 0.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.25rem;
}

#interestRate {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--light);
}

/* Calculator Results */
.result-card {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border-radius: 16px;
    padding: 2.5rem;
    border: 2px solid #BAE6FD;
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.result-main {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.result-label {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.result-amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.result-details {
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.result-item span:first-child {
    color: var(--gray);
}

.result-item span:last-child {
    font-weight: 700;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--gray);
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: var(--light);
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--gray);
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
}

.contact-item .icon {
    font-size: 2rem;
}

.contact-item .label {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.contact-item .value {
    color: var(--gray);
}

/* Testimonials Section */
.testimonials-section {
    padding: 5rem 0;
    background: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
}

.testimonial-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-style: italic;
    color: var(--dark);
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Reveal on scroll */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition:
        opacity 700ms cubic-bezier(.2, .8, .2, 1),
        transform 700ms cubic-bezier(.2, .8, .2, 1),
        filter 700ms cubic-bezier(.2, .8, .2, 1);
    will-change: opacity, transform, filter;
    filter: blur(6px);
}

[data-reveal].in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Marquee / continuous testimonials */
.marquee {
    overflow: hidden;
    margin-top: 2rem;
}

.marquee-track {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    /* width is implicit; duplicated items create continuous loop */
    animation: marquee 31s linear infinite;
}

.testimonial-card {
    flex: 0 0 auto;
    min-width: 300px;
    background: var(--light);
    padding: 1.75rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand h3 {
    margin-bottom: 0.5rem;
}

.footer-brand p {
    opacity: 0.8;
}

.footer-contact h4 {
    margin-bottom: 1rem;
}

.footer-contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-contact-item {
    display: flex;
    gap: 1rem;
}

.footer-contact-item .icon {
    font-size: 1.5rem;
    min-width: 30px;
}

.footer-contact-item .label {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.footer-contact-item .value {
    opacity: 0.9;
    font-size: 0.95rem;
}

.footer-notice {
    background: rgba(250, 204, 21, 0.2);
    border: 2px solid var(--primary-yellow);
    padding: 1rem 2rem;
    border-radius: 8px;
}

.footer-notice p {
    color: var(--primary-yellow);
    font-weight: 600;
}

.footer-bottom {
    text-align: center;
    opacity: 0.8;
}

/* Application Form Pages */
.application-section {
    min-height: calc(100vh - 80px);
    padding: 4rem 0;
}

.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.badge {
    display: inline-block;
    background: white;
    color: var(--primary-blue);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.badge-business {
    background: var(--primary-green);
    color: white;
}

.form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.form-header p {
    opacity: 0.95;
}

.application-form {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 2px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.alert-box {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.upload-card {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 1rem;
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.upload-card span {
    font-weight: 700;
    color: var(--dark);
}

.upload-card small {
    color: var(--gray);
    line-height: 1.4;
}

.upload-card input {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.form-actions {
    margin-top: 2rem;
}

.form-note {
    text-align: center;
    margin-top: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        display: none;
    }

    .container {
        padding: 0 16px;
    }

    .hero {
        min-height: auto;
        padding-top: 2rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.15;
        text-align: center;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
        max-width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
        align-items: stretch;
    }

    .calculator-grid,
    .features-grid,
    .testimonials-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .calculator-wrapper,
    .application-form {
        padding: 1.5rem;
    }

    .hero .container {
        flex-direction: column-reverse;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        transform: none;
        text-align: center;
    }

    .hero-actions {
        position: static;
        transform: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        min-width: 0;
    }

    .hero-image {
        width: 100%;
        max-width: 420px;
        max-height: 340px;
        transform: translateY(0);
    }

    .stat {
        text-align: center;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .testimonial-card {
        min-width: 0;
    }
}

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

.feature-card,
.loan-card,
.testimonial-card {
    animation: fadeIn 0.6s ease-out;
}