/* communities.css — loaded AFTER site.css.
   Scope: community + standalone editorial pages.
   Purpose: keep under-filled card rows centered (instead of left-weighted)
   and provide a real-image hero treatment for community pages. */

/* --- Centered card rows -------------------------------------------------
   A grid-3 that holds only 1 or 2 cards leaves empty trailing columns, so the
   row reads as off-center / left-weighted. .card-row lays the same cards out
   as a centered, wrapping flex row while preserving the 3-up card width. */
.card-row{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:20px;
}
.card-row > .card{
  /* match grid-3 column sizing: three across within a .container */
  flex:1 1 300px;
  max-width:calc((100% - 40px) / 3);
}
@media (max-width:900px){
  .card-row > .card{max-width:calc((100% - 20px) / 2)}
}
@media (max-width:620px){
  .card-row > .card{max-width:100%;flex-basis:100%}
}

/* --- Community hero image ----------------------------------------------
   Real photographic hero using the shared .article-hero-img sizing. */
.community-hero{
  width:100%;
  aspect-ratio:16/8;
  object-fit:cover;
  border-radius:var(--r-lg);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  display:block;
}

/* Secondary "homes" feature image inside the prose flow. */
.community-homes-media{
  position:relative;
  border-radius:var(--r-lg);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  aspect-ratio:16/8;
  background:#1f2c22 center/cover no-repeat;
  background-image:linear-gradient(140deg,#3a2f1d,#8A6B43 60%,#143126);
  margin-top:22px;
}
.community-homes-media::after{
  content:"";
  position:absolute;
  inset:0;
  box-shadow:inset 0 0 0 1px rgba(201,161,90,.22);
  border-radius:inherit;
}
