/* =========================================================
   AAC Blog — News & Events list + article page
   ========================================================= */
:root {
  --b-green: #007d45;
  --b-deep: #063a33;
  --b-gold: #ffcd00;
  --b-ink: #10210f;
  --b-muted: #4a5a48;
  --b-ease: cubic-bezier(.22, 1, .36, 1);
  --b-font: var(--font-secondary, "Poppins", sans-serif);
}

/* ---------- Search box (in the hero) ---------- */
.aac-phero--blog .aac-phero__inner { padding-bottom: 6px; }
.aac-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 620px;
  margin-top: 26px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .55);
  font-family: var(--b-font);
  transition: box-shadow .4s var(--b-ease), transform .4s var(--b-ease);
}
.aac-search:focus-within { box-shadow: 0 0 0 5px rgba(255, 205, 0, .45), 0 24px 50px -20px rgba(0, 0, 0, .6); transform: translateY(-2px); }
.aac-search__icon { font-size: 1.3rem; color: var(--b-green); }
.aac-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 4px;
  font-size: 1rem;
  color: var(--b-ink);
}
.aac-search input::-webkit-search-cancel-button { cursor: pointer; }
.aac-search__btn {
  flex-shrink: 0;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--b-gold);
  color: var(--b-ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform .35s var(--b-ease), box-shadow .35s;
}
.aac-search__btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(255, 205, 0, .9); }
.aac-search__spin {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 125, 69, .2);
  border-top-color: var(--b-green);
  opacity: 0;
  animation: aacBSpin .7s linear infinite;
  transition: opacity .2s;
}
.aac-search.is-loading .aac-search__spin { opacity: 1; }
@keyframes aacBSpin { to { transform: rotate(360deg); } }

/* ---------- Featured story ---------- */
.aac-blogfeat { padding: clamp(60px, 7vw, 90px) 0 0; background: #fff; font-family: var(--b-font); }
.aac-blogfeat__card {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-radius: 30px;
  overflow: hidden;
  background: var(--b-deep);
  color: #fff;
  box-shadow: 0 40px 70px -40px rgba(4, 41, 31, .8);
}
.aac-blogfeat__media { position: relative; min-height: 340px; overflow: hidden; }
.aac-blogfeat__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--b-ease); }
.aac-blogfeat__card:hover .aac-blogfeat__media img { transform: scale(1.07); }
.aac-blogfeat__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 54px); }
.aac-blogfeat__tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--b-gold);
  color: var(--b-ink);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.aac-blogfeat .aac-post__meta { color: rgba(255, 255, 255, .7); }
.aac-blogfeat .aac-post__meta i { color: var(--b-gold); }
.aac-blogfeat__title { margin: 0 0 14px; font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.22; color: #fff; }
.aac-blogfeat__text { margin: 0 0 26px; font-weight: 300; line-height: 1.75; color: rgba(255, 255, 255, .82); }
.aac-blogfeat__btn { align-self: flex-start; }
.aac-blogfeat__card:hover .aac-blogfeat__btn { background: var(--b-gold); color: var(--b-ink) !important; gap: 16px; }

/* ---------- List ---------- */
.aac-blog { padding: clamp(60px, 7vw, 100px) 0 clamp(80px, 9vw, 120px); background: #fff; font-family: var(--b-font); scroll-margin-top: 80px; }
.aac-blog__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.aac-blog__heading { margin: 0; font-weight: 800; font-size: clamp(2.1rem, 4vw, 3.3rem); line-height: 1.06; letter-spacing: -.03em; color: var(--b-ink); }
.aac-blog__heading em { font-style: normal; color: var(--b-green); }

.aac-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aac-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #f1f5ef;
  color: var(--b-ink) !important;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .3s, color .3s, transform .3s var(--b-ease);
}
.aac-chip small { padding: 1px 8px; border-radius: 999px; background: rgba(0, 125, 69, .12); font-size: .75rem; font-weight: 700; color: var(--b-green); }
.aac-chip:hover { transform: translateY(-2px); background: #e6efe3; }
.aac-chip.is-active { background: var(--b-deep); color: #fff !important; }
.aac-chip.is-active small { background: var(--b-gold); color: var(--b-ink); }

.aac-blog__results { transition: opacity .3s; }
.aac-blog__results.is-loading { opacity: .45; pointer-events: none; }
.aac-blog__summary { margin: 0 0 22px; color: #5c6a5a; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.aac-blog__summary strong { color: var(--b-green); }
.aac-blog__clear { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px; background: #fdecec; color: #b83232 !important; font-size: .82rem; font-weight: 600; text-decoration: none; }

.aac-blog__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }

.aac-post {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(16, 33, 15, .07);
  box-shadow: 0 20px 40px -32px rgba(16, 33, 15, .5);
  transition: transform .55s var(--b-ease), box-shadow .55s var(--b-ease), border-color .4s;
  animation: aacBIn .8s var(--b-ease) both;
  animation-delay: var(--d, 0s);
}
@keyframes aacBIn { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }
.aac-post:hover { transform: translateY(-8px); border-color: rgba(0, 125, 69, .2); box-shadow: 0 34px 56px -32px rgba(16, 33, 15, .55); }
.aac-post__cover { position: absolute; inset: 0; z-index: 5; border-radius: inherit; }
.aac-post__cover:focus-visible { outline: 3px solid var(--b-gold); outline-offset: 3px; }
.aac-post__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eef3ec; }
.aac-post__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s var(--b-ease); }
.aac-post:hover .aac-post__media img { transform: scale(1.08); }
.aac-post__cat {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--b-green);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.aac-post__body { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 22px; }
.aac-post__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font-size: .8rem; color: #6b786a; }
.aac-post__meta span { display: inline-flex; align-items: center; gap: 6px; }
.aac-post__meta i { color: var(--b-green); }
.aac-post__title {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--b-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .3s;
}
.aac-post:hover .aac-post__title { color: var(--b-green); }
.aac-post__text {
  margin: 0 0 16px;
  font-size: .92rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--b-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.aac-post__more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--b-green); transition: gap .4s var(--b-ease); }
.aac-post:hover .aac-post__more { gap: 14px; }
mark { padding: 0 2px; border-radius: 4px; background: rgba(255, 205, 0, .55); color: inherit; }

.aac-blog__empty { text-align: center; padding: 50px 20px; border-radius: 24px; background: #f6f8f3; }
.aac-blog__empty span { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 50%; background: #fff; color: var(--b-green); font-size: 1.8rem; }
.aac-blog__empty h3 { margin: 0 0 8px; font-weight: 700; font-size: 1.3rem; color: var(--b-ink); }
.aac-blog__empty p { margin: 0; color: var(--b-muted); }
.aac-blog__empty a { color: var(--b-green); font-weight: 600; }

/* pager (list) */
.aac-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: clamp(32px, 4vw, 48px); flex-wrap: wrap; }
.aac-pager__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--b-deep);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .35s, color .35s, transform .35s var(--b-ease), gap .35s var(--b-ease);
}
.aac-pager__btn:hover { background: var(--b-gold); color: var(--b-ink) !important; transform: translateY(-2px); gap: 12px; }
.aac-pager__btn.is-disabled { background: #eef2ec; color: #a3ada1 !important; pointer-events: none; }
.aac-pager__nums { display: flex; align-items: center; gap: 6px; }
.aac-pager__num {
  display: grid;
  place-items: center;
  min-width: 44px; height: 44px;
  padding: 0 6px;
  border-radius: 14px;
  background: #f1f5ef;
  color: var(--b-ink) !important;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .3s, color .3s, transform .3s var(--b-ease);
}
.aac-pager__num:hover { transform: translateY(-2px); background: #e3ece0; }
.aac-pager__num.is-current { background: var(--b-gold); color: var(--b-ink) !important; }
.aac-pager__gap { color: #8a9688; }

/* ================= Article page ================= */
.aac-read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10001;
  height: 4px;
  background: linear-gradient(90deg, var(--b-green), var(--b-gold));
  transform-origin: left;
  transform: scaleX(var(--read, 0));
  pointer-events: none;
}

.aac-article { padding: calc(70px + clamp(36px, 5vw, 60px)) 0 clamp(60px, 7vw, 90px); background: #fff; font-family: var(--b-font); }
.aac-article__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; font-size: .85rem; color: #6b786a; }
.aac-article__crumbs a { color: var(--b-green) !important; text-decoration: none; }
.aac-article__crumbs a:hover { text-decoration: underline; }
.aac-article__crumbs span:last-child { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.aac-article__header { max-width: 900px; }
.aac-article__cat { display: inline-block; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(0, 125, 69, .1); color: var(--b-green); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.aac-article__title { margin: 0 0 18px; font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 3.3rem); line-height: 1.12; letter-spacing: -.025em; color: var(--b-ink); }
.aac-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 0 0 30px; color: #5c6a5a; font-size: .92rem; }
.aac-article__meta span { display: inline-flex; align-items: center; gap: 8px; }
.aac-article__meta i { color: var(--b-green); font-size: 1.05rem; }

.aac-article__hero { margin: 0 0 clamp(30px, 4vw, 50px); border-radius: 28px; overflow: hidden; box-shadow: 0 34px 64px -36px rgba(16, 33, 15, .55); background: #eef3ec; }
.aac-article__hero img { display: block; width: 100%; max-height: 620px; object-fit: cover; cursor: zoom-in; transition: transform 1.2s var(--b-ease); }
.aac-article__hero:hover img { transform: scale(1.02); }
.aac-article__hero .article-embed { margin: 0; }

.aac-article__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(30px, 5vw, 70px); align-items: start; }

.aac-article__body { font-size: 1.07rem; line-height: 1.9; color: #2f3d2e; }
.aac-article__body p { margin: 0 0 1.3em; }
.aac-article__body h2, .aac-article__body h3, .aac-article__body h4 { margin: 1.6em 0 .6em; font-weight: 700; line-height: 1.3; color: var(--b-ink); }
.aac-article__body img { max-width: 100%; height: auto; border-radius: 18px; }
.aac-article__body a { color: var(--b-green); font-weight: 500; }
.aac-article__body blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--b-gold); border-radius: 0 16px 16px 0; background: #f6f8f3; font-style: italic; }
.aac-article__body ul, .aac-article__body ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.aac-article__body > p:first-child::first-letter {
  float: left;
  margin: .08em .12em 0 0;
  font-size: 3.6em;
  line-height: .85;
  font-weight: 800;
  color: var(--b-green);
}

/* share */
.aac-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 34px 0 0; padding-top: 24px; border-top: 1px solid rgba(16, 33, 15, .1); }
.aac-share > span { font-weight: 600; color: var(--b-ink); margin-right: 4px; }
.aac-share a, .aac-share button {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5ef;
  color: var(--b-green) !important;
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s, color .3s, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.aac-share a:hover, .aac-share button:hover { background: var(--b-gold); color: var(--b-ink) !important; transform: translateY(-4px) rotate(-6deg); }
.aac-share__copied { font-size: .85rem; color: var(--b-green); opacity: 0; transition: opacity .3s; }
.aac-share__copied.is-on { opacity: 1; }

/* sidebar */
.aac-aside { position: sticky; top: 96px; display: grid; gap: 22px; }
.aac-aside__box { padding: 22px; border-radius: 22px; background: #f6f8f3; }
.aac-aside__title { margin: 0 0 14px; font-size: 1rem; font-weight: 700; color: var(--b-ink); }
.aac-aside .aac-search { margin: 0; max-width: none; padding: 6px 6px 6px 16px; box-shadow: 0 0 0 1px rgba(16, 33, 15, .08); }
.aac-aside .aac-search input { padding: 9px 2px; font-size: .92rem; }
.aac-aside .aac-search__btn { padding: 10px 14px; }
.aac-aside__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.aac-aside__list a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-decoration: none; }
.aac-aside__list img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; transition: transform .5s var(--b-ease); }
.aac-aside__list strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .88rem; line-height: 1.4; color: var(--b-ink); transition: color .3s; }
.aac-aside__list small { display: block; margin-top: 4px; font-size: .76rem; color: #6b786a; }
.aac-aside__list a:hover img { transform: scale(1.07); }
.aac-aside__list a:hover strong { color: var(--b-green); }

/* prev / next post */
.aac-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: clamp(40px, 5vw, 64px); }
.aac-postnav__item {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(16, 33, 15, .08);
  box-shadow: 0 18px 36px -30px rgba(16, 33, 15, .5);
  text-decoration: none;
  overflow: hidden;
  transition: transform .5s var(--b-ease), box-shadow .5s var(--b-ease), border-color .4s, background-color .4s;
}
.aac-postnav__item--next { grid-template-columns: 1fr 84px; text-align: right; }
.aac-postnav__item--next .aac-postnav__thumb { order: 2; }
.aac-postnav__thumb { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; background: #eef3ec; }
.aac-postnav__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--b-ease); }
.aac-postnav__label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--b-green); transition: gap .4s var(--b-ease); }
.aac-postnav__item--next .aac-postnav__label { flex-direction: row-reverse; }
.aac-postnav__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .98rem; font-weight: 600; line-height: 1.4; color: var(--b-ink); }
.aac-postnav__item:hover { transform: translateY(-5px); background: var(--b-deep); border-color: var(--b-deep); }
.aac-postnav__item:hover .aac-postnav__title { color: #fff; }
.aac-postnav__item:hover .aac-postnav__label { color: var(--b-gold); gap: 12px; }
.aac-postnav__item:hover .aac-postnav__thumb img { transform: scale(1.1); }
.aac-postnav__item.is-empty { visibility: hidden; }

/* more stories */
.aac-more { padding: clamp(60px, 7vw, 90px) 0 clamp(80px, 9vw, 110px); background: #f6f6f2; font-family: var(--b-font); }
.aac-more__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.aac-more__heading { margin: 0; font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.025em; color: var(--b-ink); }
.aac-more__heading em { font-style: normal; color: var(--b-green); }

.aac-article-missing { text-align: center; padding: 60px 20px; }
.aac-article-missing h1 { font-weight: 800; color: var(--b-ink); }

/* responsive */
@media (max-width: 991.98px) {
  .aac-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aac-blogfeat__card { grid-template-columns: 1fr; }
  .aac-blogfeat__media { min-height: 260px; }
  .aac-article__layout { grid-template-columns: 1fr; }
  .aac-aside { position: static; }
}
@media (max-width: 575.98px) {
  .aac-blog__grid { grid-template-columns: 1fr; }
  .aac-search { padding-left: 16px; }
  .aac-search__btn { padding: 12px 16px; }
  .aac-postnav { grid-template-columns: 1fr; }
  .aac-postnav__item, .aac-postnav__item--next { grid-template-columns: 64px 1fr; text-align: left; }
  .aac-postnav__item--next .aac-postnav__thumb { order: 0; }
  .aac-postnav__item--next .aac-postnav__label { flex-direction: row; }
  .aac-postnav__thumb { width: 64px; height: 64px; }
  .aac-pager__nums { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aac-blog *, .aac-blogfeat *, .aac-article *, .aac-more *, .aac-post { animation: none !important; transition-duration: .01ms !important; }
}

/* photo zoom on the article page */
.aac-zoom { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 24px; background: rgba(4, 22, 16, .92); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; cursor: zoom-out; }
.aac-zoom.is-open { opacity: 1; }
.aac-zoom img { max-width: 100%; max-height: 90vh; border-radius: 16px; transform: scale(.95); transition: transform .4s cubic-bezier(.22, 1, .36, 1); }
.aac-zoom.is-open img { transform: none; }
.aac-zoom button { position: absolute; top: 20px; right: 20px; width: 50px; height: 50px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.5rem; cursor: pointer; }
.aac-zoom button:hover { background: #ffcd00; color: #10210f; }


/* ---------- Centred search (no banner) ---------- */
.aac-blogsearch {
  padding: calc(70px + clamp(36px, 5vw, 60px)) 0 0;   /* clears the fixed navbar */
  background: #fff;
}
.aac-search--center {
  margin: 0 auto;
  max-width: 680px;
  box-shadow: 0 0 0 1px rgba(16, 33, 15, .08), 0 18px 40px -24px rgba(16, 33, 15, .4);
}
.aac-search--center:focus-within { box-shadow: 0 0 0 4px rgba(0, 125, 69, .2), 0 22px 46px -24px rgba(16, 33, 15, .45); }
.aac-blogsearch + .aac-blogfeat { padding-top: clamp(36px, 5vw, 56px); }
.aac-blogsearch + .aac-blog { padding-top: clamp(36px, 5vw, 56px); }
