@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

:root {
    --primary-color: #008975;
    --primary-dark: #006d5d;
    /* Slightly darker for gradients/active states */
    --primary-light: #2e8b45;
    /* Kept for reference, maybe unused */
    --accent-color: #ffd700;
    --text-color: #ffffff;
    /* Global white text */
    --bg-color: #00BF9A;
    /* Global body background */
    --white: #ffffff;
    --error: #d9534f;
    --success: #5cb85c;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Hover specific */
    --btn-hover-blue: #4DA6FF;
    /* Light Blue */

    /* Card specific for legibility on colored bg */
    --card-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
}

.theme-dark-green {
    /* Ensuring this class matches root in case it's manually applied */
    --bg-color: #00BF9A;
    --text-color: #ffffff;
    --primary-color: #008975;
    --primary-dark: #006d5d;
    --btn-hover-blue: #4DA6FF;

    --card-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
}

.theme-dark-green .card,
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--white);
}

.theme-dark-green .card h3,
.card h3 {
    color: var(--white);
}

.theme-dark-green .stat-card .value,
.stat-card .value {
    color: var(--white) !important;
}

.theme-dark-green .btn,
.btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Explicitly set hover to BLUE globally */
.btn:hover,
.theme-dark-green .btn:hover {
    background-color: var(--btn-hover-blue);
    border-color: var(--btn-hover-blue);
}

.theme-dark-green nav a {
    color: var(--white);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Nav */
header {
    background: linear-gradient(135deg, #005a4d 0%, #007f69 100%);
    /* Match Carousel Cards */
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--white);
    line-height: 1.2;
}

.logo small {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.5rem !important;
    /* Force override inline styles if needed */
    font-weight: normal;
    font-style: italic;
    /* Although Great Vibes is already cursive */
    opacity: 0.9;
    letter-spacing: 1px;
    color: var(--accent-color);
    /* Make it pop a bit, or keep white */
    display: block;
    margin-top: 4px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: #f0f0f0;
}

/* Containers */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    /* Reduced specific padding for mobile */
    width: 100%;
    /* Full width for mobile */
}

@media (min-width: 768px) {
    .container {
        padding: 20px;
        width: 95%;
    }
}

/* Responsive Form Grids */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .form-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .form-grid.three-col {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-full {
        grid-column: 1 / -1;
    }
}


/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    text-align: center;
    padding: 100px 20px;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    background-color: var(--accent-color);
    color: var(--primary-dark);
    font-weight: bold;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-btn:hover {
    background-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Features/Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    padding-bottom: 40px;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

/* Auth Pages Specific */
body:has(.card[style*="max-width: 400px"]),
body:has(.card[style*="max-width: 600px"]) {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: #222;
    color: #aaa;
    text-align: center;
    padding: 40px 20px;
    margin-top: auto;
}

/* Mobile Polish */
@media (max-width: 767px) {
    .card {
        padding: 20px;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }

    body:has(.card[style*="max-width: 400px"]) .card,
    body:has(.card[style*="max-width: 600px"]) .card,
    body:has(.card[style*="max-width: 800px"]) .card {
        margin: 20px auto !important;
        width: 95% !important;
        max-width: none !important;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Mobile Header Adjustments */
    header {
        padding: 0.5rem 10px;
        /* Push content to edges */
    }

    .logo {
        font-size: 1.1rem;
        /* Reduce font size */
        max-width: 75%;
        /* Limit width to allow space for button */
    }

    /* Mobile Menu Styles */
    .mobile-menu-btn {
        display: block !important;
        /* Force show on mobile */
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.5);
        color: white;
        font-size: 1.5rem;
        padding: 5px 10px;
        border-radius: 4px;
        cursor: pointer;
    }

    /* Hide links by default */
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.2);
        padding: 10px;
        border-radius: 8px;
        margin-top: 10px;
    }

    /* Show links when active class is toggled */
    .nav-links.active {
        display: flex;
    }

    /* Navbar container adjustments */
    nav {
        flex-wrap: wrap;
        /* Allow wrapping so menu drops down */
        justify-content: space-between;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }
}

/* Product Selection Cards */
.product-card {
    display: block;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    position: relative;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.product-card.selected {
    border: 2px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.product-card input[type="radio"] {
    display: none;
}

/* Loan Summary Box (unification) */
.loan-summary-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.loan-summary-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.2rem;
}

.loan-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.loan-summary-label {
    color: #eee;
}

.loan-summary-value {
    font-weight: bold;
    color: #fff;
}

.loan-summary-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 10px 0;
}

.text-accent {
    color: var(--accent-color);
}

.text-success-light {
    color: #76ff03;
    /* Bright green */
}

.apply-loan-card {
    max-width: 600px;
    margin: 0 auto;
}