@media (max-width: 767px) {
  /* === Layout Fixes === */

  /* Remove absolute positioning for the logo on mobile */
  .logo-container {
    position: static;
    margin: 0 auto 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 110px;
    height: 110px;
    z-index: auto;
  }

  /* Shrink the logo image slightly for mobile */
  #site-logo {
    width: 100px;
    height: 100px;
    border-width: 3px;
  }

  /* Optional: hide the blue background circle if spacing is tight */
  .logo-background {
    display: none;
  }

  /* Stack header elements vertically */
  header {
    padding: 20px 10px;
    text-align: center;
    margin-bottom: 10px;
  }

  header h2 {
    margin: 0;
    font-size: 24px;
  }

  /* Navigation bar tweaks */
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
  }

  nav a {
    font-size: 14px;
    padding: 6px 10px;
    display: inline-block;
    line-height: 1.4;
    margin: 4px;
  }

  /* Main content adjustments */
  main {
    padding: 20px 15px;
    margin-top: 10px;
  }

  main h1 {
    font-size: 24px;
  }

  main h2 {
    font-size: 20px;
  }

  main h3 {
    font-size: 18px;
  }

  .tagline {
    font-size: 16px;
  }

  .text-justify {
    text-align: left;
  }

  .features-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
  }

  .feature {
    flex-basis: 100%;
  }

  .cta-button {
    font-size: 15px;
    padding: 10px 18px;
  }

  footer {
    font-size: 14px;
    padding: 15px 10px;
  }

  /* Optional: fix footer layout if elements get cramped */
  .footer-flag {
    height: 0.9em;
    margin-left: 5px;
  }
}

