/* layout.css */
.container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: calc(100vh - 100px);
  flex-wrap: wrap;
}

.left-column {
  flex: 2;
  padding-right: 20px;
  min-height: 400px;
  box-sizing: border-box;
}

.right-column {
  flex: 1;
  padding-left: 20px;
  min-height: 400px;
  padding-bottom: 50px;
  box-sizing: border-box;
}

h2 {
  margin-top: 20px;
}

/* Add margin below images to prevent overlap */
img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Add some bottom margin to paragraphs in the right column */
.right-column p {
  margin-bottom: 20px;
}

/* Ensure clear separation of text */
.right-column {
  position: relative; 
}

/* Improve the overall readability */
body {
  line-height: 1.6;
}

/* Prevent overflow issues */
.right-column section {
  margin-bottom: 20px;
}

/* Additional adjustments for the footer */
footer {
  margin-top: 20px;
  padding: 10px;
  text-align: center;
}

/* Touch-friendly controls */
label {
  font-size: 1rem;
  margin-bottom: 4px;
}

input, select, button {
  padding: 12px;
  font-size: 1rem;
  border-radius: 6px;
}

/* Navigation tweaks for small screens */
nav ul {
  flex-wrap: wrap;
  gap: 10px;
}

nav ul li {
  margin: 5px 10px;
}

nav.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Avoid horizontal scroll */
main {
  overflow-x: hidden;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 10px;
  }

  .left-column, .right-column {
    flex: 1 1 100%;
    padding: 0;
    min-height: auto;
  }

  .right-column {
    margin-top: 20px;
    padding-bottom: 40px;
  }

  select, input[type="number"], button {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  h1, h2, h3 {
    font-size: 1.25rem;
    text-align: center;
  }

  p, label {
    font-size: 1rem;
    text-align: left;
  }

  header, footer {
    text-align: center;
    padding: 16px;
  }
}

/* Optional: sticky dark mode toggle on mobile */
#darkModeToggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

@media (min-width: 769px) {
  #darkModeToggle {
    position: static;
    box-shadow: none;
  }
}