/* Basic resets */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
}

/* Header, Navigation, and Footer styling */
header, nav, footer {
  background-color: #007bff;
  color: white;
  text-align: center;
  padding: 1em 0;
}
.header-content h1 {
  margin: 0;
  font-size: 1.8em;
}
.footer-content {
  font-size: 0.9em;
}

/* Main Calculator Container */
.calculator-container {
  max-width: 800px;
  margin: 2em auto;
  padding: 2em;
  background-color: #fff;
  border-radius: 8px;
}
.calculator-container h1,
.calculator-container p {
  text-align: center;
}

/* Form layout: 2-column grid */
#investmentForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em 2em;
  margin-top: 2em;
}
#investmentForm label {
  grid-column: 1 / 2;
  align-self: center;
}
#investmentForm input,
#investmentForm select {
  grid-column: 2 / 3;
  padding: 0.5em;
  font-size: 1em;
}
#investmentForm button {
  grid-column: 1 / 3;
  padding: 0.7em;
  font-size: 1em;
  cursor: pointer;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  margin-top: 1em;
}

/* Result container styling */
#result-container {
  margin-top: 2em;
  display: none; /* Hidden until a calculation is made */
}
.result-box {
  background-color: #e8ffe8;
  border: 1px solid #00b300;
  border-radius: 5px;
  padding: 1em;
}
.result-box p {
  margin: 0.5em 0;
}

/* Navigation Styles */
.menu-container {
  position: relative;
  z-index: 9999; /* Ensure it's on top */
}
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  background: #005bb5;
  justify-content: center;
}
.menu > li {
  position: relative;
  margin: 0 15px;
}
.menu > li > a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  padding: 10px 15px;
  display: block;
}
.dropdown .submenu {
  display: none;
  position: absolute;
  background: #005bb5;
  left: 0;
  top: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 150px;
  z-index: 1000;
}
.dropdown:hover .submenu {
  display: block;
}
.submenu li a {
  padding: 10px 15px;
  display: block;
  color: white;
  text-decoration: none;
  font-size: 16px;
}
.arrow {
  font-size: 12px;
  margin-left: 5px;
}

/* Mobile Toggle Button */
.menu-toggle {
  display: none;
  background: #005bb5;
  border: none;
  color: white;
  padding: 10px 15px;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

/* Responsive Navigation Styles */
@media (max-width: 768px) {
  .menu {
    flex-direction: column;
    display: none;
    width: 100%;
  }
  .menu > li {
    text-align: center;
    margin: 0;
  }
  .menu-toggle {
    display: block;
  }
  .menu.show {
    display: flex;
  }
  /* Make dropdowns static in mobile view */
  .dropdown .submenu {
    position: static;
  }
}

.below-calculator {
  max-width: 800px;
  margin: 2em auto;
  display: grid;
  grid-template-columns: 1fr; /* single column */
  gap: 2em;
}


/* Ads Section */
.ads-section {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1em;
}
.ads-section h2 {
  margin-top: 0;
  font-size: 1.3em;
  text-align: center;
}

/* Related Calculators (Category Links) */
.related-calculators {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1em;
}
.related-calculators h2 {
  margin-top: 0;
  font-size: 1.3em;
  text-align: center;
}
.related-calculators ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.related-calculators li {
  margin: 0.5em 0;
}
.related-calculators a {
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
}
.related-calculators a:hover {
  text-decoration: underline;
}
