/* Grid layout for li elements (cards) - VERTICAL STYLE */
li.media {
  flex: 1 1 300px; /* flex-grow, flex-shrink, flex-basis */
  max-width: 300px; 
  margin: 1% 1% 20px 1%;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 1.2em 1em;
  background-color: #fff;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
}



li.media img {
  width: 100%;        /* Fills the width of its container */
  max-width: 220px;   /* Keeps the image from getting too huge */
  height: auto;
  display: block;
  margin: 0 auto 1em; /* Centered and spaced below */
  border-radius: 8px; /* Optional: makes the corners slightly rounded */
}


/* Make sure all spans are still inline for compactness */
span.al {
  font-weight: bold;
  display: block;
  margin-right: 4px;
  font-size: 1.05em;
  margin-top: 0.1em;
}

span.av {
  display: block;
  margin-bottom: 0.1em; /* adds spacing after each pair */
}

/* Responsive adjustments */
@media (max-width: 900px) {
  li.media {
    width: 45%; /* 2 per row */
  }
}

@media (max-width: 600px) {
  li.media {
    width: 100%; /* Stack on narrow screens */
  }
}


ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2%;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}



li.media h3,
li.media p,
li.media .media-heading,
li.media a {
  margin: .5em 0;
}

.gn {
  display: block;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 0.5em; /* optional: adds vertical space */
}

span.av.gd {
  display: block;
  font-size: 1em;
  line-height: 1.4;
  text-align: left;
  padding: 0 0.5em;
  margin-bottom: 0.5em;

  /* New additions to force proper wrapping */
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

span.al.description {
  text-align: left;
  display: block;
  padding: 0 0.5em;
  margin-top: 0.3em;
  font-size: 1.05em;
}

































