/* ==========================================================
   Home — School Activities (scoped under .acx)
   "Polaroid board": deep-blue band with a dot pattern; each
   activity is a white polaroid-style card, alternately tilted,
   that straightens and lifts on hover. Numbered with a CSS
   counter, so the CMS loop stays untouched.
   Logo palette: royal blue + orange.
   ========================================================== */
.acx {
  --acx-blue: #0d4f9c;
  --acx-blue-deep: #072f61;
  --acx-orange: #f08a1c;
  --acx-orange-deep: #d9740a;
  --acx-ink: #142033;
  --acx-muted: #5a6577;
  position: relative;
  overflow: hidden;
  padding: 64px 0 72px;
  background: linear-gradient(160deg, var(--acx-blue-deep) 0%, var(--acx-blue) 100%);
  color: #fff;
}
.acx::before {
  /* dot pattern */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  pointer-events: none;
}
.acx::after {
  /* soft orange glow */
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 138, 28, .28), transparent 65%);
  pointer-events: none;
}
.acx-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- heading row ---------- */
.acx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.acx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffc27a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.acx-dash { width: 26px; height: 3px; border-radius: 3px; background: var(--acx-orange); }
.acx-title {
  margin: 10px 0 0;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.acx-title span { color: var(--acx-orange); }
.acx-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  background: var(--acx-orange);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.acx-more:hover { background: #fff; color: var(--acx-blue-deep); transform: translateY(-2px); }

/* ---------- polaroid grid ---------- */
.acx-grid {
  counter-reset: acx;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
.acx-grid > .acx-card:nth-child(even) { margin-top: 26px; }

.acx-card {
  counter-increment: acx;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 0;
  border-radius: 10px;
  background: #fff;
  color: var(--acx-ink);
  box-shadow: 0 26px 50px -22px rgba(0, 0, 0, .55);
  transform: rotate(-2deg);
  transition: transform .35s ease, box-shadow .35s ease;
}
.acx-card:nth-child(even) { transform: rotate(2deg); }
.acx-card:hover {
  transform: rotate(0) translateY(-10px);
  box-shadow: 0 36px 60px -24px rgba(0, 0, 0, .6);
  z-index: 2;
}
.acx-card::before {
  /* tape strip */
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(240, 138, 28, .85);
  border-radius: 3px;
  z-index: 2;
}
.acx-card:nth-child(even)::before { background: rgba(255, 214, 160, .9); transform: translateX(-50%) rotate(4deg); }

.acx-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: #e8eef6;
}
.acx-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.acx-card:hover .acx-img img { transform: scale(1.06); }

.acx-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 6px 18px;
}
.acx-num {
  position: absolute;
  top: -22px;
  right: 8px;
}
.acx-num::before {
  content: counter(acx, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--acx-blue);
  border: 3px solid #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.acx-card-title {
  margin: 0;
  padding-right: 40px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--acx-blue-deep);
}
.acx-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--acx-muted); }
.acx-text p { margin: 0; }
.acx-link {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed #dfe6ef;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--acx-orange-deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: gap .2s ease, color .2s ease;
}
.acx-link:hover { gap: 12px; color: var(--acx-blue); }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
  .acx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
  .acx-grid > .acx-card:nth-child(even) { margin-top: 0; }
}
@media (max-width: 991px) { .acx { padding: 52px 0 60px; } }
@media (max-width: 640px) {
  .acx { padding: 44px 0 52px; }
  .acx-wrap { padding: 0 16px; }
  .acx-title { font-size: 32px; }
  .acx-more { width: 100%; justify-content: center; }
  .acx-grid { grid-template-columns: 1fr; gap: 36px; }
  .acx-card, .acx-card:nth-child(even) { transform: rotate(0); }
  .acx-img { aspect-ratio: 4 / 3; }
}
