/* Custom Properties for Global Consistency */
:root {
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --secondary: #22c55e;
    --secondary-hover: #16a34a;
    --text-main: #1f2937;
    --text-muted: #64748b;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--text-main);
    background-color: #f8fafc;
}

/* ===== Navbar Container ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px); /* Modern blur effect */
    padding: 0 8%;
    height: 80px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ===== Logo Section ===== */
.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
    color: var(--text-main);
    text-decoration: none;
}

.logo img {
    height: 38px;
    margin-right: 12px;
}

/* ===== Navigation Logic ===== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 32px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--primary);
}

/* ===== Buttons ===== */
.nav-buttons {
    display: flex;
    gap: 16px;
}

.nav-buttons button {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.apply-loan {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(124, 58, 237, 0.3);
}

.apply-loan:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.23);
}

.partner-login {
    background-color: transparent;
    color: var(--secondary);
    outline: 2px solid var(--secondary);
}

.partner-login:hover {
    background-color: var(--secondary);
    color: #fff;
}

/* ===== Mobile Responsive Logic ===== */

.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; }

@media (max-width: 992px) {
    .navbar { padding: 0 5%; }

    .nav-toggle-label {
        display: flex;
        align-items: center;
        height: 100%;
    }

    /* Professional Hamburger Icon */
    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        background: var(--text-main);
        height: 2px;
        width: 24px;
        border-radius: 2px;
        position: relative;
        transition: var(--transition);
    }

    .nav-toggle-label span::before,
    .nav-toggle-label span::after { content: ''; position: absolute; }
    .nav-toggle-label span::before { bottom: 8px; }
    .nav-toggle-label span::after { top: 8px; }

    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        border-top: 1px solid #f1f5f9;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #f8fafc;
    }

    .nav-links li a {
        padding: 18px 5%;
        font-size: 16px;
    }

    .nav-buttons {
        flex-direction: column;
        padding: 24px 5%;
        width: 100%;
        box-sizing: border-box;
    }

    /* Mobile Toggle Actions */
    .nav-toggle:checked ~ .nav-menu {
        max-height: 100vh;
        box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    }

    .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
    .nav-toggle:checked ~ .nav-toggle-label span::before { transform: rotate(45deg); bottom: 0; }
    .nav-toggle:checked ~ .nav-toggle-label span::after { transform: rotate(-45deg); top: 0; }
}