/* Base page styles =*/
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.4;
  color: #222;
  background: hsla(199, 97%, 65%, 0.219);            /* will change under 500px */
}

/* Header / Footer */
header, footer {
  background: #66cece56;
  border-bottom: 1px solid #ddd;
  text-align: center;
  padding: 16px;
}
footer { border-top: 1px solid #ddd; border-bottom: 0; }

/* Main container */
main { max-width: 1200px; margin: 24px auto; padding: 0 12px; }

/* FLEX LAYOUT FOR CARDS (Week 10) */
.students {
  display: flex;            /* turn on flexbox */
  flex-wrap: wrap;          /* allow wrapping onto new lines */
  gap: 16px;                /* simple space between cards */
  justify-content: center;  /* center the whole row */
}

/* each card is flexible: grows, shrinks, and has a good minimum width */
.card {
  flex: 1 1 260px;          /* grow, shrink, basis (min width) */
  max-width: 320px;         /* don’t let cards get too wide on huge screens */
  display: flex;            /* column layout inside card */
  flex-direction: column;
  background: #ffffffbe;
  border: 1px solid #ddd;
  padding: 12px;
}

/*  Image + caption */
.card figure { margin: 0 0 8px; }
.card img {
  width: 100%;
  height: auto;             /* keeps GIFs proportional */
  border: 1px solid #e6e6e6;
}

/* Text inside the card */
.card h3 { margin: 6px 0; font-size: 18px; }
.card blockquote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 3px solid #cfe0ff;  /* simple “quote bar” */
  color: #333;
}
.card p { margin: 6px 0 0; }

/* Small-screen tweak (under 500px) */
@media (max-width: 500px) {
  body { background: #eef6ff; }   /* executes the required color change */
  .card { flex: 1 1 100%; }       /* makes cards go full width on phones */
}
