.richtext{max-width:900px}
.richtext>*:first-child{margin-top:0}
.richtext>*:last-child{margin-bottom:0}
.richtext h2,.richtext h3{margin:1.5em 0 .55em}
.richtext p,.richtext ul,.richtext ol{margin:.8em 0}
.richtext img{display:block;max-width:100%;height:auto;border-radius:20px}
.article-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.article-card{overflow:hidden}
.article-card__image{display:block;width:100%;aspect-ratio:16/10;object-fit:cover}
.article-card__body{padding:24px}
.article-card__date{display:block;margin-bottom:10px;color:var(--muted,#687079);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.article-card h3{margin:0 0 10px}
.article-card p{margin:0;color:var(--muted,#687079)}
.article-cover{margin:0 0 28px;width:100%;max-height:560px;object-fit:cover;border-radius:24px}
.form-status{grid-column:1/-1;margin:0;color:#17663a}
.form-status.is-error{color:#910029}
.pagination{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:32px}
.pagination a,.pagination span{display:grid;place-items:center;min-width:42px;height:42px;padding:0 12px;border:1px solid rgba(20,31,42,.15);border-radius:12px;text-decoration:none}
.pagination .active{background:#910029;color:#fff;border-color:#910029}
.article-grid>.pagination{grid-column:1/-1}
.collection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.empty-state{padding:32px;text-align:center;color:var(--muted,#687079)}

/* Editable photo gallery: each card is a child MODX Resource with an Image TV. */
.photo-gallery-head{max-width:760px;margin-bottom:28px}
.photo-gallery-head .lead{margin-top:12px}
.photo-gallery-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:190px;gap:12px}
.photo-gallery-grid>.empty-state{grid-column:1/-1;border:1px dashed var(--c-line,#d8e1e5);border-radius:18px;background:var(--c-bg,#f1f6f8)}
.photo-gallery-card{
  position:relative;
  grid-column:span 4;
  min-width:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:18px;
  background:var(--c-dark,#252b32);
  color:#fff;
  text-align:left;
  isolation:isolate;
  cursor:zoom-in;
  transition:transform 160ms var(--c-ease,cubic-bezier(.23,1,.32,1)),box-shadow 180ms ease;
}
.photo-gallery-card:nth-child(1){grid-column:span 7;grid-row:span 2}
.photo-gallery-card:nth-child(2),.photo-gallery-card:nth-child(3){grid-column:span 5}
.photo-gallery-card:nth-child(7n+4){grid-column:span 5}
.photo-gallery-card:nth-child(7n+5){grid-column:span 7}
.photo-gallery-card:nth-child(7n+6){grid-column:span 5}
.photo-gallery-card:nth-child(7n+7){grid-column:span 7}
.photo-gallery-card:nth-child(7n+8),.photo-gallery-card:nth-child(7n+9),.photo-gallery-card:nth-child(7n+10){grid-column:span 4}
.photo-gallery-card::after{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,transparent 40%,rgba(15,18,21,.82) 100%);pointer-events:none}
.photo-gallery-card img{width:100%;height:100%;object-fit:cover;transition:transform 500ms var(--c-ease,cubic-bezier(.23,1,.32,1))}
.photo-gallery-card>span{position:absolute;left:18px;right:18px;bottom:17px;z-index:2}
.photo-gallery-card b,.photo-gallery-card small{display:block}
.photo-gallery-card b{font-size:15px;line-height:1.28}
.photo-gallery-card small{margin-top:4px;color:rgba(255,255,255,.76);font-size:10px;line-height:1.45}
.photo-gallery-card:focus-visible{outline:3px solid rgba(151,0,44,.28);outline-offset:4px}
.photo-gallery-card:active{transform:scale(.992)}

@media(hover:hover) and (pointer:fine){
  .photo-gallery-card:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(26,33,39,.14)}
  .photo-gallery-card:hover img{transform:scale(1.045)}
}
@media(max-width:900px){
  .article-grid,.collection-grid{grid-template-columns:1fr 1fr}
  .photo-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:250px}
  .photo-gallery-card,.photo-gallery-card:nth-child(n){grid-column:auto;grid-row:auto}
  .photo-gallery-card:nth-child(1),.photo-gallery-card:nth-child(5){grid-column:1/-1}
}
@media(max-width:620px){
  .article-grid,.collection-grid{grid-template-columns:1fr}
  .article-card__body{padding:20px}
  .photo-gallery-grid{grid-template-columns:1fr;grid-auto-rows:260px;gap:10px}
  .photo-gallery-card,.photo-gallery-card:nth-child(n){grid-column:auto;min-height:260px;border-radius:16px}
}
@media(prefers-reduced-motion:reduce){
  .photo-gallery-card,.photo-gallery-card img{transition-duration:.01ms!important}
}
