/*
 * Program pages (components/ProgramSingle.tsx), 2026-11-05: art and heritage programs, the festivals among them.
 * Replaces the Elementor single templates. The hero is the program list pages' (components/PageHero.tsx, styles/hero.css) in the
 * program's own colour; one 1200 px column; the description beside a card with the picture and links.
 */

.acm-ps {
  --ps-line: var(--accent-line);
}
.acm-ps .acm-ps-h1 {
  margin: 0 0 28px;
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
  text-transform: uppercase;
  color: var(--acm-ink);
}

.acm-ps-main {
  padding: 20px 20px 0;
}

/* breadcrumb */
.acm-ps-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: 13px;
  line-height: 1.5;
  color: var(--acm-muted);
}
.acm-ps .acm-ps-crumbs a {
  color: var(--accent);
  text-decoration: none;
}
.acm-ps .acm-ps-crumbs a:hover {
  text-decoration: underline;
}
/* every step but the page's own title in capitals */
.acm-ps-crumbs > span:not([aria-current]) {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.acm-ps-crumbs__sep {
  margin-left: 4px;
  color: var(--acm-faint);
}
.acm-ps-crumbs [aria-current] {
  color: var(--acm-ink);
  font-weight: 600;
}

/* description + card */
.acm-ps-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 56px;
}
.acm-ps-text p {
  margin: 0 0 1.1em;
}
.acm-ps-text p:last-child {
  margin-bottom: 0;
}
.acm-ps-text a {
  color: var(--accent);
  overflow-wrap: anywhere;
}
.acm-ps-text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-sm);
}
.acm-ps-card {
  position: sticky;
  top: 110px;
  border: 1px solid var(--ps-line);
}
.acm-ps-card__img {
  display: block;
  background: var(--accent-soft);
}
.acm-ps-card__img img {
  display: block;
  width: 100%;
  height: auto;
}
.acm-ps-links {
  margin: 0;
  padding: 10px 14px;
  list-style: none;
}
.acm-ps-links li + li {
  border-top: 1px solid var(--ps-line);
}
.acm-ps .acm-ps-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--acm-ink);
  text-decoration: none;
}
.acm-ps .acm-ps-links a:hover .acm-ps-links__label {
  color: var(--accent);
}
.acm-ps-links__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.acm-ps-links__icon--facebook {
  background: #1877f2;
}
.acm-ps-links__icon--instagram {
  background: linear-gradient(45deg, #f9b233, #e1306c 50%, #833ab4);
}
.acm-ps-links__label {
  min-width: 0;
  overflow-wrap: anywhere;
  transition: color 0.2s;
}
.acm-ps-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 4px 18px 18px;
}
.acm-ps-cats span {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--acm-text-2);
}
.acm-ps-links + .acm-ps-cats {
  padding-top: 0;
}

/* sections */
.acm-ps-sec {
  margin-top: 56px;
}
.acm-ps-video {
  position: relative;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-md);
  background: #000;
}
.acm-ps-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.acm-ps-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-ps-gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--accent-soft);
}
.acm-ps-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.acm-ps-gallery a:hover img {
  transform: scale(1.05);
}
.acm-ps-banner {
  margin: 56px 0 0;
}
.acm-ps-banner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
}

/* news + other programs: full content width */
.acm-ps-wide {
  max-width: calc(1200px + 40px);
  margin: 64px auto 0;
  padding: 0 20px;
}
.acm-ps-wide .acm-ps-news {
  max-width: none;
  margin: 0 -15px;
  padding: 0;
}
.acm-ps-wide__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
}
.acm-ps .acm-ps-all {
  margin-bottom: 18px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.acm-ps-others {
  margin-bottom: 90px;
}
.acm-ps-wide:last-child {
  margin-bottom: 90px;
}
.acm-ps-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-ps .acm-ps-other {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.acm-ps-other__img {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--acm-placeholder);
  box-shadow: var(--sh-card);
}
.acm-ps-other__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.acm-ps-other:hover .acm-ps-other__img img {
  transform: scale(1.05);
}
.acm-ps-other__title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--acm-ink);
}
.acm-ps-other:hover .acm-ps-other__title {
  color: var(--accent);
}
/* the page ends with the share row when there is nothing else */
.acm-ps-main:last-child {
  padding-bottom: 90px;
}

@media (max-width: 1024px) {
  .acm-ps .acm-ps-h1 {
    font-size: 28px;
  }
  .acm-ps-body {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
  }
  .acm-ps-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .acm-ps .acm-ps-h1 {
    font-size: 22px;
  }
  .acm-ps-main {
    padding: 16px 16px 0;
  }
  .acm-ps-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  /* the card first: picture and links before the long text */
  .acm-ps-card {
    position: static;
    order: -1;
  }
  .acm-ps-sec {
    margin-top: 44px;
  }
  .acm-ps-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .acm-ps-wide {
    margin-top: 48px;
    padding: 0 16px;
  }
  .acm-ps-cards {
    gap: 14px;
  }
  .acm-ps-other__title {
    font-size: 14px;
  }
}

/* ───────── news and artist pages (components/PostSingle.tsx) ───────── */

.acm-po .acm-ps-main {
  padding-bottom: 90px;
}
.acm-po-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--acm-muted);
}
.acm-po-meta time {
  font-weight: 700;
  color: var(--accent);
}
.acm-po-meta span {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  font-weight: 600;
  color: var(--acm-text-2);
}
/* the news picture whole (often a poster), at most the column's width */
.acm-po-figure {
  display: block;
  margin: 0 0 26px;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--accent-soft);
}
.acm-po-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
}
.acm-po-latest {
  padding: 18px 18px 14px;
}
.acm-po-latest ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-po-latest li + li {
  border-top: 1px solid var(--ps-line);
}
.acm-po .acm-po-latest a {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  color: inherit;
  text-decoration: none;
}
.acm-po-latest__img {
  flex: none;
  width: 84px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--acm-placeholder);
}
.acm-po-latest__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.acm-po-latest__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.35;
  color: var(--acm-ink);
}
.acm-po-latest__text time {
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--acm-muted);
}
.acm-po-latest a:hover .acm-po-latest__text span {
  color: var(--accent);
}
.acm-po .acm-po-latest__all {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.acm-po-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ps-line);
}
.acm-po .acm-po-pager__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s;
}
.acm-po .acm-po-pager__link:hover {
  background: var(--accent-line);
}
.acm-po-pager__link--next {
  text-align: right;
}
.acm-po-pager__dir {
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}
.acm-po-pager__title {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.35;
  color: var(--acm-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 767px) {
  .acm-po .acm-ps-main {
    padding-bottom: 56px;
  }
  /* news: the article first, the latest news after it */
  .acm-po-latest {
    order: 1;
  }
  .acm-po-pager {
    grid-template-columns: minmax(0, 1fr);
  }
}
.acm-po-lead {
  margin-bottom: 1.4em;
  padding-bottom: 1.2em;
  border-bottom: 1px solid var(--ps-line);
  font-size: 17.5px;
  color: var(--acm-ink);
}

/* share buttons (components/ShareRow.tsx): one style for every network, its colour on hover */
.acm-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-ps .acm-share__btn {
  --share-color: var(--acm-brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--ps-line);
  border-radius: var(--r-pill);
  background: #fff;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--acm-ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.acm-ps .acm-share__btn svg {
  flex: none;
  color: var(--share-color);
  transition: color 0.2s;
}
.acm-ps .acm-share__btn:hover,
.acm-ps .acm-share__btn:focus-visible {
  border-color: var(--share-color);
  background: var(--share-color);
  color: #fff;
  transform: translateY(-1px);
}
.acm-ps .acm-share__btn:hover svg,
.acm-ps .acm-share__btn:focus-visible svg {
  color: #fff;
}
.acm-ps .acm-share__btn:focus-visible {
  outline: 2px solid var(--share-color);
  outline-offset: 2px;
}
@media (max-width: 767px) {
  .acm-share {
    gap: 8px;
  }
  .acm-ps .acm-share__btn {
    height: 40px;
    padding: 0 14px 0 12px;
    font-size: 13.5px;
  }
}

/* compact gallery (components/GalleryStrip.tsx): one row, "+N" on the last picture shown */
.acm-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-strip li:nth-child(n + 7) {
  display: none;
}
.acm-strip a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
}
.acm-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.acm-strip a:hover img {
  transform: scale(1.05);
}
.acm-strip a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.acm-strip__more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(16, 18, 40, 0.6);
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  transition: background-color 0.2s;
}
.acm-strip a:hover .acm-strip__more {
  background: rgba(16, 18, 40, 0.72);
}
.acm-strip__more--4 {
  display: none;
}
@media (max-width: 1024px) {
  .acm-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .acm-strip li:nth-child(n + 5) {
    display: none;
  }
  .acm-strip__more--6 {
    display: none;
  }
  .acm-strip__more--4 {
    display: grid;
  }
  .acm-strip__more {
    font-size: 18px;
  }
}
@media (max-width: 767px) {
  .acm-strip {
    gap: 6px;
  }
  .acm-strip a {
    border-radius: var(--r-sm);
  }
}

/* videos (components/VideoRow.tsx): four columns whatever their number (two on tablets/phones); play in a window */
.acm-vr {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-ps .acm-vr__card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.acm-vr__img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--acm-ink);
  box-shadow: var(--sh-card);
}
.acm-vr__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.acm-vr__card:hover .acm-vr__img img {
  transform: scale(1.05);
}
.acm-vr__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding-left: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s, background-color 0.25s, color 0.25s;
}
.acm-vr__card:hover .acm-vr__play {
  background: var(--accent);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}
.acm-vr__title {
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--acm-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.acm-ps .acm-vr__card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-md);
}
.acm-vr-modal {
  padding: 24px 72px;
}
.acm-vr-modal__box {
  width: min(1180px, 100%);
}
.acm-vr-modal__video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 120px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--r-md);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.acm-vr-modal__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.acm-vr-modal__title {
  margin: 14px 0 0;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #fff;
}
.acm-vr-modal button.acm-vr-modal__nav,
.acm-vr-modal button.acm-vr-modal__close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}
.acm-vr-modal button.acm-vr-modal__nav {
  top: 50%;
  transform: translateY(-50%);
}
.acm-vr-modal button.acm-vr-modal__nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.acm-vr-modal__nav--prev {
  left: 14px;
}
.acm-vr-modal__nav--next {
  right: 14px;
}
.acm-vr-modal button.acm-vr-modal__close {
  top: 14px;
  right: 14px;
}
@media (max-width: 1024px) {
  .acm-vr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .acm-vr {
    gap: 12px;
  }
  .acm-vr__title {
    font-size: 14px;
  }
  .acm-vr__play {
    width: 42px;
    height: 42px;
  }
  .acm-vr-modal {
    padding: 64px 8px 8px;
  }
  .acm-vr-modal button.acm-vr-modal__nav {
    top: auto;
    bottom: 16px;
    transform: none;
  }
}

/* news photo gallery (news-gallery.php): under the article in its column, so bigger pictures than the strip's
   one row of 6: 3 per row, up to 6 shown at every width, the 6th with "+N"; all of them in the lightbox */
.acm-po-gallery {
  margin-top: 40px;
}
.acm-po-gallery .acm-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.acm-po-gallery .acm-strip a {
  box-shadow: 0 0 0 1px var(--accent-line); /* white pictures keep an edge */
}
.acm-po-gallery .acm-strip li:nth-child(-n + 6) {
  display: list-item;
}
.acm-po-gallery .acm-strip__more--6 {
  display: grid;
}
.acm-po-gallery .acm-strip__more--4 {
  display: none;
}
@media (max-width: 767px) {
  .acm-po-gallery {
    margin-top: 32px;
  }
  .acm-po-gallery .acm-strip {
    gap: 6px;
  }
}
