/* Calculator Styling */
.calculator-wrapper {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
     margin: 0 auto; /* Center the calculator wrapper */
    max-width: 1000px; /* Limit the width of the calculator */
}

.calculator-wrapper h1 {
    margin-bottom: 20px;
    text-align: left;
    color: var(--primary-color);
    font-size: 2.5rem;
   text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Add a subtle text shadow */
}
.calculator-wrapper p {
    margin-bottom: 20px;
    text-align: center;
}

/* Form Styling */
form {
   display: flex;
   flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

label {
    font-weight: bold;
    display: block;
     margin-bottom: 5px;
}

input[type="number"],
input[type="text"],
input[type="date"],
select {
  padding: 10px;
   border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: border-color 0.3s;
    width: 100%; /* Make input elements full width in their container */
    box-sizing: border-box; /* Include padding and border in elements' total width */
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="date"]:focus,
select:focus{
    outline: none;
    border-color: var(--primary-color);
   box-shadow: 0 0 5px rgba(52,152,219, 0.5);
}

/* Button Styling */
button {
    background-color: var(--primary-color);
    color: white;
   border: none;
    padding: 12px 24px;
    border-radius: 6px;
   cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
}

button:hover{
   background-color: var(--secondary-color)
}


/* Results Styling */
.results {
   margin: 20px 0;
    background-color: #f9f9f9;
     padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}
.results h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.result-item {
   margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.result-item strong{
  margin-right: 10px;
}
.results-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.result-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
     box-shadow: var(--box-shadow);
    flex-basis: calc(30% - 20px); /* create a 3 column layout */
    text-align: center;
}
/* Amortization Schedule Styles */
.amortization-schedule {
   overflow-x: auto;
    margin-top: 20px;
}

.amortization-schedule h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.table-container {
    width: 100%;
    overflow-x: auto;
    background-color: white;
     border-radius: 8px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}

#amortization-table {
    display: block;
  width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
#amortization-table .table-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

#amortization-table .table-row {
   display: flex;
   border-bottom: 1px solid var(--border-color);
}
#amortization-table .table-cell {
   flex: 1;
    padding: 8px;
    text-align: left;
    border-right: 1px solid var(--border-color);
}
#amortization-table .table-header .table-cell {
   background-color: #f0f0f0;
    font-weight: bold;
}
/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        text-align: center;
        width: 100%;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 10;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .nav-links a {
      padding: 10px;
       display: block;
    }

    .content-area {
      flex-direction: column;
    }

    .content-area-right {
      width: 100%;
    }

    footer .container {
      flex-direction: column;
    }

    footer nav ul {
       flex-direction: column;
    }

    footer nav li{
        padding: 0px;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
 .calculator-wrapper h1 {
        font-size: 2rem;
    }

    .result-item {
        font-size: 1rem;
    }

     #amortization-table th,
     #amortization-table td {
        padding: 4px;
       font-size: 0.9rem;
    }
}