/* Basic reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f4f8;
    color: #0f3252;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Header styling */
header {
    background-color: white;
    color: #004080;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .logo img {
    max-width: 150px;
    transition: transform 0.3s ease;
}

header .logo img:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    gap: 20px;
    list-style-type: none;
}

nav ul li a {
    color: #004080;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(0, 64, 128, 0.1);
    border-radius: 5px;
}

/* Main content */
main {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Loan Calculator Section */
.loan-calculator {
    background: linear-gradient(145deg, #ffffff, #f7f9fc);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 800px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.loan-calculator h1 {
    font-size: 2.5rem;
    color: #004080;
    margin-bottom: 20px;
}

.loan-calculator h2 {
    font-size: 2rem;
    color: #004080;
    margin-bottom: 10px;
}

.loan-calculator p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.loan-calculator label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #004080;
}

.loan-calculator input,
.loan-calculator button {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.loan-calculator input:focus {
    border-color: #004080;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 64, 128, 0.5);
}

.loan-calculator button {
    background-color: #004080;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.loan-calculator button:hover {
    background-color: #00264d;
    transform: scale(1.05);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

table th,
table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #0f3252;
    font-size: 0.95rem;
}

table th {
    background-color: #004080;
    color: white;
}

table tbody tr:nth-child(even) {
    background-color: #f7f9fc;
}

/* Footer styling */
footer {
    background: white;
    color: #004080;
    padding: 50px;
    text-align: center;
    font-size: 0.95rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

footer:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for mobile */
@media only screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    main {
        padding: 30px;
    }

    .loan-calculator {
        padding: 20px;
    }

    .loan-calculator h1,
    .loan-calculator h2 {
        font-size: 1.8rem;
    }

    .loan-calculator p {
        font-size: 1rem;
    }

    footer {
        font-size: 0.85rem;
    }

    /* Make table scrollable on mobile */
    table {
        font-size: 0.85rem;
        overflow-x: auto;
        display: block;
    }

    table th, table td {
        padding: 8px;
    }

    table th {
        font-size: 0.9rem;
    }
}

/* Extra small devices (iPhone 5 and smaller) */
@media only screen and (max-width: 480px) {
    .loan-calculator h1,
    .loan-calculator h2 {
        font-size: 1.5rem;
    }

    table th, table td {
        padding: 5px;
        font-size: 0.75rem;
    }
}