/* Main Styles - Loan Knowledge Test Website */
:root {
    --primary-blue: #1e3a5f;
    --secondary-blue: #2c5282;
    --accent-green: #2f855a;
    --light-green: #48bb78;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --text-dark: #1a202c;
    --text-gray: #4a5568;
    --border-color: #e2e8f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.15);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

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

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--light-green);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
}

/* Main Content */
main {
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-gray);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.card a {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
}

/* Article Page */
.article-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.article-header h1 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.article-meta {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.article-body {
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-body h2 {
    color: var(--secondary-blue);
    margin: 2rem 0 1rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.article-nav a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
}

/* Test Page */
.test-container {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.test-header {
    text-align: center;
    margin-bottom: 2rem;
}

.test-header h1 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.question {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
}

.question h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: var(--accent-green);
    background: #f0fff4;
}

.option input {
    margin-top: 0.3rem;
}

.option label {
    cursor: pointer;
    flex: 1;
}

.submit-test {
    text-align: center;
    margin-top: 2rem;
}

/* Results */
.result-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.result-box.pass {
    background: #c6f6d5;
    border: 2px solid var(--accent-green);
}

.result-box.fail {
    background: #fed7d7;
    border: 2px solid #e53e3e;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

/* Footer */
footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--light-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-wrap: wrap;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 1rem;
    }

    nav ul.active {
        display: flex;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .article-content {
        padding: 1.5rem;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--accent-green);
    text-decoration: none;
}

.breadcrumb span {
    color: var(--text-gray);
    margin: 0 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-dark);
}

.pagination a:hover {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.pagination .active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* Table of Contents */
.toc {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.toc h3 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--accent-green);
    text-decoration: none;
}

/* Alert Box */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-info {
    background: #bee3f8;
    border-left: 4px solid #3182ce;
}

.alert-warning {
    background: #fefcbf;
    border-left: 4px solid #d69e2e;
}

.alert-success {
    background: #c6f6d5;
    border-left: 4px solid #38a169;
}
