/* General Styles */
body {
  font-family: 'Inter', Arial, sans-serif;
  background-color: #f4f4f9;
  margin: 0;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
  padding-bottom: 6rem; /* Add more space at the bottom of the page */

}

.disclaimer-banner {
  background-color: rgba(255, 59, 48, 0.85);
  color: white;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: top 0.3s ease; /* Smooth transition for the banner */
}

.disclaimer-banner p {
  margin: 0;
  line-height: 1.6;
  max-width: 800px;
  padding: 0 1rem;
}

.disclaimer-banner a {
  color: white;
  text-decoration: underline;
  font-weight: 500;
}

.disclaimer-banner a:hover {
  color: #f8f9fa;
  text-decoration: none;
}

/* Close Button */
.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.close-btn:hover {
  color: #f8f9fa;
}

/* Scroll Up Effect */
body.scrolled .disclaimer-banner {
  top: -100px; /* Hide banner when scrolled down */
}

/* Container */
.container {
  display: flex;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-sizing: border-box;
}

/* Calculator Section */
.calculator {
  flex: 1;
  padding: 0.5rem;
  box-sizing: border-box;
}

.calculator h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 600;
}

.calculator p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.calculator form {
  display: flex;
  flex-direction: column;
}

.calculator label {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
}

.calculator input {
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.calculator input:focus {
  border-color: #007bff;
  outline: none;
}

.calculator button {
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.calculator button:hover {
  background-color: #0056b3;
}

/* Result Section */
.result {
  margin-top: 1.5rem;
  padding: 0 1.5rem 1.5rem; /* Remove top padding */
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.result *:first-child {
  margin-top: 1; /* Ensure no top margin on first element */
  padding-top: 0;
}

.result h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #333;
  font-weight: 600;
}

.result p {
  margin: 0;
  color: #333;
  font-size: 0.95rem;
}

.free-postage {
  color: #28a745;
  font-weight: 500;
}

/* Example Section */
.example {
  flex: 1;
  background-color: #f8f9fa;
  padding: 0 1.5rem 1.5rem; /* Remove top padding */
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-sizing: border-box;
}
.example *:first-child {
  margin-top: 1; /* Ensure no top margin on first element */
  padding-top: 0;
}
.example h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #333;
  font-weight: 600;
}

.example h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
}

.example p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.example ol,
.example ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.example li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

/* Ad Placeholders */
.placeholder-ad {
  background-color: #e9ecef;
  border: 1px dashed #ccc;
  color: #666;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Left and Right Vertical Ads */
.ad-left,
.ad-right {
  position: fixed;
  top: 6rem;
  width: 160px;
  height: 600px;
  z-index: 999;
}

.ad-left {
  left: 10px;
}

.ad-right {
  right: 10px;
}

/* Bottom Horizontal Ad */
.ad-bottom {
  position: fixed; /* Fixed position to stick to the bottom */
  bottom: 0; /* Position at the bottom of the page */
  left: 50%; /* Center horizontally */
  transform: translateX(-50%); /* Adjust for exact centering */
  width: 100%; /* Full width */
  max-width: 728px; /* Maximum width for the ad */
  height: 90px; /* Height of the ad */
  background-color: #e9ecef; /* Placeholder background */
  display: flex; /* Center content */
  align-items: center;
  justify-content: center;
  z-index: 999; /* Ensure it's above other content */
}

/* Ensure the main container doesn't overlap with ads */
.container {
  margin-left: 180px;
  margin-right: 180px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Responsive Design for Ads */
@media (max-width: 1200px) {
  .ad-left,
  .ad-right {
    display: none; /* Hide side ads on smaller screens */
  }

  .container {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .ad-bottom {
    width: 90%; /* Adjust width for smaller screens */
    max-width: 100%; /* Allow full width on mobile */
  }
}

/* Responsive Layout for Narrow Screens */
@media (max-width: 900px) {
  .container {
    flex-direction: column; /* Stack calculator and example vertically */
    margin-top: 8rem; /* Increased top margin for mobile */
    margin-left: 1rem; /* Restore left margin */
    margin-right: 1rem; /* Restore right margin */
    padding: 1rem; /* Reduce padding for narrow screens */
  }

  .calculator,
  .example {
    width: 100%; /* Full width for narrow screens */
    padding: 1.5rem; /* Consistent padding for both panes */
    margin: 0; /* Remove margins to prevent overflow */
    box-sizing: border-box; /* Ensure padding is included in the width calculation */
  }

  .example {
    margin-top: 1.5rem; /* Add space between calculator and example */
    background-color: #f8f9fa; /* Ensure background color is consistent */
    border-radius: 8px; /* Rounded corners */
    border: 1px solid #e9ecef; /* Consistent border */
  }

  .ad-left,
  .ad-right {
    display: none; /* Hide side ads on narrow screens */
  }

  .ad-bottom {
    width: 100%; /* Full width on mobile */
    max-width: 100%; /* Allow full width */
    height: auto; /* Adjust height for mobile */
    padding: 1rem 0; /* Add padding for better spacing */
  }
}

/* Mobile Layout for Banner */
@media (max-width: 768px) {
  .disclaimer-banner {
    padding: 0.5rem; /* Further reduce padding for mobile */
    font-size: 0.7rem; /* Smaller font size for mobile */
  }

  .disclaimer-banner p {
    padding: 0 0.5rem; /* Reduce padding for mobile */
  }

  /* Ensure banner scrolls completely away */
  body.scrolled .disclaimer-banner {
    top: -120px; /* Adjust scroll distance for mobile */
  }
}