:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --text-color: #333;
    --background-color: #f0f0f0;
    --border-color: #ddd;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0 auto;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    max-width: 1200px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 0.7em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Layout for Header */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
}
header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
   text-align: center;
  justify-content: center;
}
header .logo {
    font-size: 1.5rem;
    font-weight: bold;
   color: var(--text-color);
    text-decoration: none;
  margin-bottom: 10px;
}

/* Navigation Styles */
nav {
  display: flex;
    align-items: center;
   justify-content: center;
    flex: 1;
}

.menu-toggle {
  display: none; /* Hide on desktop */
    background: transparent;
    border: none;
   font-size: 1.5rem;
    cursor: pointer;
   color: var(--text-color)
}
.nav-links {
    list-style: none;
    margin: 0;
   padding: 0;
   display: flex;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
   color: var(--text-color);
   text-decoration: none;
    transition: color 0.3s;
}
.nav-links a:hover{
   color: var(--primary-color)
}

/* Main Content Styles */
main {
    padding: 20px 0;
    display: flex;    /* Enable flex layout */
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
  flex: 1;   /* Take up the rest of the page*/
}
.content-area {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 0;
  justify-content: center;
     max-width: 100%;
}

.content-area-left {
  padding: 10px;
    text-align: center;
}
.content-area-right {
    padding: 10px;
    text-align: center;
}
/* Ad Space Styles */
.ad-space {
    background-color: #e0e0e0;
    padding: 20px;
    text-align: center;
  margin-bottom: 20px;
  border-radius: 8px;
}

.ad-space.ad-top {
    margin-bottom: 20px;
}
/* Footer Styles */
footer {
    background-color: #333;
   color: #fff;
    padding: 20px 0;
    text-align: center;
}
footer .container {
    display: flex;
   justify-content: space-between;
    align-items: center;
}
footer nav ul {
    padding: 0;
    margin: 0;
   list-style: none;
  display: flex;
}

footer nav li {
    padding-left: 15px;
}

footer nav a {
    text-decoration: none;
    color: white;
}

/* 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)
}

/* 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;
       max-width: 100%;
       padding: 0 15px;
  }
  .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;
    }
}