:root {
  --md-primary-fg-color:        #4DB6AC;
  --md-primary-fg-color--light: #4DB6AC;
  --md-primary-fg-color--dark:  #4DB6AC;
}

/* Container spacing */
.home-buttons {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.home-buttons.center,
.home-buttons.text-center,
.home-buttons-center {
  text-align: center;
}

/* Container for side-by-side images */
.image-gallery {
  display: flex;
  flex-direction: row;      /* Force horizontal on desktop */
  flex-wrap: nowrap;        /* Prevent wrapping on large screens */
  justify-content: center;  /* Center the group */
  gap: 20px;
  margin: 2rem 0;
  width: 100%;
}

.image-gallery img {
  /* Set a fixed maximum width so they fit side-by-side */
  max-width: 45%;
  height: auto;
  border-radius: 8px;
  display: inline-block;    /* Allow them to sit next to each other */
}

@media screen and (max-width: 45em) {
  /* Mobile: Stack buttons and make them full width */
  .home-buttons .md-button {
    display: block;
    margin-right: 0;
    margin-bottom: 12px;
    text-align: center;
    width: 100%; /* Optional: ensures single buttons also fill width on small phones */
  }

  /* Mobile: Image centered, text below it */
  .stack-mobile-left, .stack-mobile-right {
    text-align: center;
    display: block;
    width: 100%;
    margin-bottom: 20px;
  }

  .stack-mobile-left img, .stack-mobile-right img {
    float: none;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
  }

  /* Mobile specific override */
  .image-gallery {
    display: grid;          /* Switch to grid for easy centering */
    grid-template-columns: 1fr;
    place-items: center;    /* Perfect centering */
  }

  .image-gallery img {
    max-width: 280px;       /* Standard phone width */
    width: auto;
    margin: 0 auto;
  }
}

@media screen and (min-width: 45.1em) {
  /* Desktop: Keep them inline with a gap */
  .home-buttons .md-button {
    margin-right: 12px;
    display: inline-block;
  }

  .home-buttons .md-button:last-child {
    margin-right: 0;
  }

  /* Desktop: Image on the right or left, text wraps */
  .stack-mobile-left img {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
  }
  .stack-mobile-right img {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
  }
}