/* ===========================
   Keith Ceramic — Card Grids
   =========================== */

/* ---- Design tokens ---- */
:root{
  /* brand colors */
  --kc-navy: #0f113a;
  --kc-accent: #ff7a00;
  --kc-blue-700: #1f6aff;
  --kc-blue-400: #4ea3ff;

  /* card + media */
  --muni-radius: 16px;
  --muni-shadow: 0 12px 28px rgba(8,18,44,.12);
  --muni-shadow-hover: 0 20px 44px rgba(8,18,44,.20);
  --muni-card-h: 360px;          /* total card height */
  --muni-media-h: 220px;         /* image area height */

  /* image sizing inside media area */
  --muni-media-pad: 22px;        /* white padding around image */
  --muni-img-max: 78%;           /* max width/height of image inside media */
}

/* ---- Section headings: orange + twin blue bars ---- */
/* Apply to any section id you use */
#rings > h2,
#railway > h2,
#muni > h2{
  position: relative;
  margin: 0 0 12px;
  padding-left: 28px;             /* space for the bars */
  line-height: 1.15;
  font-weight: 800;
  color: var(--kc-accent);
  letter-spacing: .5px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
#rings > h2::before,  #rings > h2::after,
#railway > h2::before,#railway > h2::after,
#muni > h2::before,   #muni > h2::after{
  content: "";
  position: absolute;
  left: 0;
  top: .08em;
  bottom: .08em;
  border-radius: 3px;
}
#rings > h2::before, #railway > h2::before, #muni > h2::before{
  width: 6px;
  background: var(--kc-blue-700);
}
#rings > h2::after, #railway > h2::after, #muni > h2::after{
  left: 10px;
  width: 4px;
  background: var(--kc-blue-400);
}

/* (optional) small intro paragraph under a heading */
.muni-intro{
  margin: 0 0 18px;
  color: #3a475a;
  max-width: 80ch;
}

/* ---- Responsive grid (3 / 2 / 1) ---- */
.muni-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 28px;
}
@media (max-width: 1024px){
  .muni-grid{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px){
  .muni-grid{ grid-template-columns: 1fr; }
}

/* ---- Non-clickable card with elegant hover ---- */
.muni-card{
  background: #fff;
  border-radius: var(--muni-radius);
  box-shadow: var(--muni-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: var(--muni-card-h);
  color: var(--kc-navy);
  cursor: default;
  transition: transform .22s ease, box-shadow .22s ease;
  will-change: transform, box-shadow;
}
.muni-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--muni-shadow-hover);
}

/* ---- Media area: centered, contained, consistent ---- */
.muni-media{
  position: relative;
  height: var(--muni-media-h);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--muni-media-pad);
  overflow: hidden;               /* hide tiny hover zoom edges */
}
.muni-media img{
  width: auto;
  height: auto;
  max-width: var(--muni-img-max);
  max-height: var(--muni-img-max);
  object-fit: contain;            /* never crop */
  object-position: center;
  display: block;

  /* gentle hover that doesn't hit the edges */
  transform: scale(0.96);
  transition: transform .28s ease;
}
.muni-card:hover .muni-media img{
  transform: scale(1.0);
}

/* optional soft edge glow on hover */
.muni-card:hover .muni-media::after{
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
  pointer-events: none;
}

/* ---- Body ---- */
.muni-body{
  background: #f7f9fc;
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(0,0,0,.04);
  display: grid;
  align-content: end;
  gap: 6px;
}
.muni-body h3{
  margin: 0;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  line-height: 1.25;

  /* keep two lines max so rows stay even */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.muni-body p{
  margin: 0;
  color: #3a475a;
  font-weight: 500;
}

/* ---- Small-screen tuning ---- */
@media (max-width: 640px){
  :root{ --muni-img-max: 72%; }
}
