/*
 * "About us" pages built in the manager (components/AboutPage.tsx). The hero copies the Elementor "Бидний тухай"
 * page (logo top left at 45 % width, a 270° blue → purple overlay at 0.6, the wave); the rest was redesigned
 * 2026-11-04: no side menu (the header menu has the same links), one centred column about 90 characters wide, a row
 * of key numbers, quotes as boxes like the membership page's "how to join", an optional picture per section and the
 * program pages as link cards. Tablets and phones drop the hero logo (the header already shows it).
 */

.acm-ap {
  --ap-soft: var(--accent-soft);
  --ap-line: var(--accent-line);
}

/* ───────── hero ───────── */

/* PageHero with the logo picture at the top left instead of a full photo, and a stronger wash */
.acm-ap-hero {
  background-position: top left;
  background-repeat: no-repeat;
  background-size: 45% auto;
}
.acm-ap-hero__overlay {
  opacity: 0.6;
}

/* ───────── the column ───────── */

/* key numbers */
.acm-ap-stats {
  display: grid;
  grid-template-columns: repeat(var(--ap-cols, 3), minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 56px;
  padding: 0;
  list-style: none;
}
.acm-ap-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px 22px;
  border-radius: var(--r-md);
  background: var(--ap-soft);
  text-align: center;
}
.acm-ap-stat__value {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--accent);
}
.acm-ap-stat__label {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--acm-text-2);
}

/* sections */
.acm-ap-sec + .acm-ap-sec {
  margin-top: 44px;
}
.acm-ap-sec__text p {
  margin: 0 0 1em;
  text-indent: 20px;
}
.acm-ap-sec__text p:last-child {
  margin-bottom: 0;
}
.acm-ap-sec__text a {
  color: var(--accent);
}
/* the same box as the membership page's "how to join" (membership.css .acm-mp-join__box), in the page colour */
.acm-ap-sec__text--quote {
  text-align: start;
}
.acm-ap-sec__text--quote p {
  text-indent: 0;
}
.acm-ap-sec__image {
  margin: 28px 0 0;
}
.acm-ap-sec__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--sh-card-hover);
}

/* gallery: the pictures keep their shape (the board's group photos are wide), 2 per row, open in the lightbox */
.acm-ap-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.acm-ap-gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  box-shadow: var(--sh-card);
}
.acm-ap-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 700 / 380;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.acm-ap-gallery a:hover img {
  transform: scale(1.05);
}
.acm-ap-gallery a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* member list: name and role, two columns */
.acm-ap-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-ap-person {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 0 14px 14px;
  border-bottom: 1px solid var(--accent-line);
  border-left: 3px solid transparent;
  transition: border-color 0.2s, background-color 0.2s;
}
.acm-ap-person:hover {
  border-left-color: var(--accent);
  background: var(--ap-soft);
}
.acm-ap-person__name {
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--acm-ink);
}
.acm-ap-person__role {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.35;
  color: #5d6280;
}
.acm-ap .acm-ap-person__email {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.acm-ap .acm-ap-person__email:hover {
  text-decoration: underline;
}
/* the picture comes after the list's heading/text: keep the list off it */
.acm-ap-sec__image + .acm-ap-people {
  margin-top: 24px;
}

/* program cards */
.acm-ap-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.acm-ap-cards li {
  display: flex;
}
.acm-ap .acm-ap-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
}
.acm-ap .acm-ap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.4);
}
.acm-ap .acm-ap-card:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 3px;
}
.acm-ap-card__img {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--acm-placeholder);
}
.acm-ap-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.acm-ap-card:hover .acm-ap-card__img img {
  transform: scale(1.05);
}
.acm-ap-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  border-top: 4px solid var(--card-accent);
}
.acm-ap-card__title {
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--card-accent);
}
.acm-ap-card__lead {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  color: #555;
}
/* as the home page cards' "| Дэлгэрэнгүй... |" (Hub btn-naked: Andika 13.5 px), in the program's colour */
.acm-ap-card__more {
  --dots-x: -1.5px;
  --accent: var(--card-accent);
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 4px;
}

@media (max-width: 1024px) {
  .acm-ap-hero {
    background-image: none !important; /* the logo: the header already shows it */
  }
  .acm-ap-cards {
    gap: 14px;
  }
}

@media (max-width: 767px) {
  .acm-ap-main {
    padding-top: 36px;
    padding-bottom: 56px;
  }
  .acm-ap-stats {
    gap: 8px;
    margin-bottom: 40px;
  }
  .acm-ap-stat {
    padding: 16px 6px 14px;
  }
  .acm-ap-stat__value {
    font-size: 28px;
  }
  .acm-ap-stat__label {
    font-size: 14px;
  }
  .acm-ap-sec + .acm-ap-sec {
    margin-top: 36px;
  }
  /* justified text leaves wide gaps on a narrow screen */
  .acm-ap-sec__text {
    text-align: start;
  }
  .acm-ap-cards,
  .acm-ap-people {
    grid-template-columns: minmax(0, 1fr);
  }
  .acm-ap-gallery {
    gap: 8px;
  }
  .acm-ap-card__img {
    aspect-ratio: 16 / 9;
  }
}
