
/* ---------- Grid container ---------- */
.platform-columns {
  display: grid;
  gap: 0.5rem;                    /* controls spacing between cards */
  grid-template-columns: repeat(4, 1fr); /* desktop: 4 columns */
  align-items: stretch;
}

/* ---------- Responsive breakpoints ---------- */

/* Tablet: 3 columns */
@media (max-width: 1023px) {
  .platform-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 2 columns */
@media (max-width: 768px) {
  .platform-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Small mobile: 1 column */
@media (max-width: 420px) {
  .platform-columns {
    grid-template-columns: 1fr;
  }
}

/* ---------- Grid items ---------- */
.platform-columns > .column {
  display: flex;                  /* allows card to stretch */
}

/* ---------- Card sizing & equal-height behavior ---------- */
.card.is-flex {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Keep the observation header aligned with the card's rounded top edge. */
.platform-observation-hero {
  --platform-aqi-color: #b5b5b5;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  color: #363636;
  text-align: center;
  background: #f5f6f7;
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
  border-start-start-radius: var(--bulma-card-radius, 0.75rem);
  border-start-end-radius: var(--bulma-card-radius, 0.75rem);
  overflow: hidden;
}

.platform-observation-reading {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.platform-observation-label {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platform-observation-ring {
  display: grid;
  place-items: center;
  width: clamp(6.5rem, 52%, 8.5rem);
  aspect-ratio: 1;
  border: 0.65rem solid var(--platform-aqi-color);
  border-radius: 50%;   /*This is the ring. WIthout the 50% radius, we have a square*/
  background: #ffffff;
  transition: border-color 200ms ease;
}

.platform-observation-value {
  color: var(--platform-aqi-color);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(10, 10, 10, 0.28);
  transition: color 200ms ease;
}

.platform-observation-category {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.platform-observation-time {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Allow content to expand evenly */
.card-content.is-flex-grow-1 {
  flex: 1 1 auto;
}

/* ---------- Card image handling ---------- */
.card .card-image {
  flex: 0 0 auto;
  overflow: hidden;               /* ensures clean cropping */
}

/* Make all main card images uniform */
.card .card-image img.card_platform_pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;              /* crop instead of distort */
  object-position: center;
}

/* ---------- Media-left avatar image ---------- */
.media-left .image img.platform_pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;             /* optional */
}

/* ---------- Optional content spacing tweaks ---------- */
.card .card-content .content {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ---------- Safety: predictable box sizing ---------- */
.platform-columns,
.platform-columns * {
  box-sizing: border-box;
}

/* Make anchor behave like a block card */
.card-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* Hover & focus styles */
.card-link:hover .card,
.card-link:focus-visible .card {
  box-shadow: 0 0.75em 1.5em rgba(10, 10, 10, 0.15);
  transform: translateY(-2px);
}

/* Smooth transition */
.card {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
