/* Layout helpers */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.back-nav {
  margin-block: 1rem;
}

.back-link {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 0.95rem;
  color: inherit;
  text-decoration: none;
}
.back-link:hover,
.back-link:focus-visible {
  border-color: #00857d;
  outline: none;
}

/* Headings & hero */
.page-title {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
}

.hero {
  margin-block: 0.75rem 2rem;
}

.hero-subtext {
  text-align: center;
  max-width: 70ch;
  margin-inline: auto;
  line-height: 1.6;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: #222;
}

/* Card grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

/* Card */
.blog-card {
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.blog-card:focus-visible {
  outline: 2px solid #00857d;
  outline-offset: 2px;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  border-color: #e0f2f1;
}

.card-media {
  aspect-ratio: 16 / 9;      /* keeps consistent height without fixed px */
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* no distortion, no layout shift */
  display: block;
}

.card-body {
  padding: 0.9rem 1rem 1.1rem;
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.card-title {
  font-size: 1.1rem;
  line-height: 1.2;
  color: #111;
}

.card-excerpt {
  color: #333;
  line-height: 1.5;
  font-size: 0.97rem;
}

.read-more {
  margin-top: 0.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #006a63;
  text-underline-offset: 2px;
}
.blog-card:hover .read-more {
  color: #00857d;
  text-decoration: underline;
}

/* Remove old styles that break responsiveness */
.social-button,
.social-button img,
#right {
  all: unset;
}

/* Small screens: tighten spacing */
@media (max-width: 420px) {
  .card-body { padding: 0.8rem 0.85rem 0.95rem; }
  .card-title { font-size: 1.02rem; }
  .card-excerpt { font-size: 0.95rem; }
}