/* General Styles for all screen sizes */

 .interestcalculatortext {
max-width: 800px;
  margin: 0 auto; /* Centers the div */
  text-align: left; /* Ensures text is left-aligned */
  padding: 10px;
line-height: 1.6;
}
 .interestcalculatortext h2, h3, h4 {
  text-align: left !important;
  margin-top: 20px;
}
h1 {
    text-align: center;
    font-size: 2rem;
    margin: 0; /* Remove default margin */
}

header, footer {
    width: 100%; /* Ensure full width */
}

header {
    position: sticky; /* Optional: Make header sticky at the top */
    top: 0;
    z-index: 1000; /* Ensure header stays above other content */
}

footer {
    margin-top: auto; /* Push footer to the bottom of the page */
}

.container {
    display: grid;
grid-template-columns: 1fr 1fr;
background-color: white;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: solid 1px;
    flex: 1; /* Allow container to grow and fill available space */
}

/* Calculator Section */
.calculator-section {
    padding: 20px;
background-color: #eee !important;
}

.input-grid label {
    display: block;
    font-size: 1.2rem;
    margin: 10px 0 5px;
}

input[type="text"], select {
    width: 90%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.1rem;
}

.radio-group label {
    font-size: 1.1rem;
}

.buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

button {
    padding: 12px 24px;
    border: none;
    background-color: #4CAF50;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
     margin: 10px;
    border-radius: 4px;
}

button:hover {
    background-color: #45a049;
}

.results-section {
    margin-top: 30px;
    padding: 20px;
    
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

.results-grid label {
    font-size: 1.2rem;
}

.results-grid span {
    font-size: 1.1rem;
}

/* Chart Containers */
.chart-container {
    margin-top: 30px;
    width: 100%;
}

canvas {
    width: 100%;
    height: auto;
}

/* Schedule Container */
#schedule-container.collapsed {
    display: none;
}

#schedule-container {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

th {
    background-color: #f4f4f4;
}

td {
    background-color: #fff;
}

/* General Styles for all screen sizes */
/* ... (Existing styles) ... */

/* Button for Collapsing Schedule */
#schedule-toggle {
    padding: 10px 20px; /* Slightly smaller padding */
    background-color: #4CAF50;
    color: white;
    font-size: 1rem; /* Slightly smaller font size */
    cursor: pointer;
    border-radius: 4px;
    margin: 20px auto; /* Center horizontally */
    display: block; /* Make it a block element for centering */
    width: fit-content; /* Adjust width to content */
}

#schedule-toggle:hover {
    background-color: #45a049;
}

/* Schedule Container */
#schedule-container.collapsed {
    display: none;
}

#schedule-container {
    margin-top: 20px;
 margin: 20px auto; /* Center the container horizontally */
    max-width: 800px; /* Set the max-width to 800px */
    width: 100%; /* Ensure it takes full width up to 800px */
}

table {
    width: 800px; /* Set desired width */
    margin: 0 auto; /* Center horizontally */
    border-collapse: collapse;
    margin-top: 20px;
}
/* Container that holds the table makes the overflow scrollable */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* On mobile devices, force the table to be wider than the viewport */
@media (max-width: 768px) {
    .table-responsive table {
        display: block; /* Ensure the table behaves as a block element */
        width: 90%;

    }
    #schedule-container {
    width: 90%; /* Ensure it takes full width up to 800px */
}
}

/* ... (Rest of your CSS) ... */

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 1rem;
    }

    .container {
        padding: 15px;
        grid-template-columns: 1fr;
    }

    .input-grid label, .buttons button, .results-grid label {
        font-size: 1rem;
    }

    .input-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .buttons button {
        margin-top: 10px;
        padding: 10px;;
        width: 90%;
    }

    #schedule-toggle {
        font-size: 1.2rem;
        padding: 10px 20px;
    }

    /* Ensuring the schedule table fits properly on mobile */
    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 10px;
    }

    #schedule-container {
        margin-top: 15px;
    }

    canvas {
        max-width: 100%;
    }
}

/* For very small screens (like phones in portrait mode) */
@media (max-width: 480px) {
    body {
        font-size: 0.9rem;
    }
     .interestcalculatortext {
  text-align: left; /* Ensures text is left-aligned */
  width: 90%;
  margin-left: 10px;
  margin-right: 10px;
}

    h1, h2 {
        font-size: 1.8rem;
    }

    .input-grid label, .buttons button, .results-grid label {
        font-size: 0.95rem;
    }

    input[type="text"], select {
        padding: 10px;
        font-size: 1rem;
    }

    .buttons button {
        font-size: 1rem;
    }

    .results-grid span {
        font-size: 1rem;
    }

    table {
        font-size: 0.8rem;
    }

    #schedule-toggle {
        font-size: 1rem;
    }
    
}