body {
    font-family: Arial, sans-serif;
    background-color: #d7dcff;
    margin: 0;
    padding: 0;
    color: #000000;
}

.main-container {
    display: flex;
    justify-content: left; /* Centers everything horizontally */
    align-items: flex-start; /* Aligns items at the top */
    padding: 20px;
    width: 70vw;
    margin: auto;
    margin-top: -2vh;
    gap: 20px; /* Space between left and right containers */
}

.left-container, .right-container {
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
}

.left-container {
    flex: 1;
    text-align: center;
}

.right-container {
    flex: 2; 
}

h1 {
    text-align: center;
    font-size: 2.3rem;
    margin-top: 4vh;
color: #545fff;
}

p {
    font-size: 1.1rem;
    line-height: 1.5;
}

.section {
    background: #ced4ff;
    padding: 15px;
    border-radius: 8px;
}

.section h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
}

label {
    display: block;
    font-weight: bold;
    margin: 10px 0 5px;
}

input {
    width: 90%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 10px;
    background: #5768ff;
    color: #fff;
    border: none;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    width: 95%;
    margin: 2vh 0;
}

button:hover {
    background: #000c90;
}

.results {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
}

.results p:nth-child(even) {
    background-color: #e8e1ff; /* Light gray background */
}

.result-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

#piechartcontainer {
    padding-left: 7vw;
}

#mortgagepiechart {
    max-width: 400px;
    max-height: 400px;
}

canvas {
    max-width: 100%;
    height: auto;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #070187;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background: #5b53ff;
    color: #fff;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

/* Article Container */
article {
    width: 50vw;
    margin: 0 auto;
    background-color: white;
    padding: 10px 5vw;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 5vh auto;
    border-radius: 1vw;
    line-height: 1.6;
}

article h1 {
    font-size: 2rem;
}

article h3 {
    text-align: center;
    color: #070090;
}

/* Link Styles */
article a {
    color: #0077cc;
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

/* Section Divider */
article hr {
    border: 1px solid #ddd;
    margin: 40px 0;
}

/* List Styles */
article ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

article ul li {
    margin-bottom: 10px;
}

article ul li:before {
    content: "• ";
    color: #0077cc;
    font-weight: bold;
    margin-right: 10px;
}

/* Mobile Layout: Stack Right Container Below Left Container */
@media (max-width: 767px) {
    .main-container {
        flex-direction: column; /* Stack elements */
        align-items: center; /* Center content */
        width: 90vw;
    }

    .left-container {
        width: 90vw;
    }

    article{
        width: 80vw;
        padding: 1vh 10vw;
    }

    article h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    article p {
        line-height: 1.6;
    }

}
