/* Named public pages also use these rules in the page editor's preview. */
.contact-page-heading h1,
.csapa-about-page .page-heading h1:last-child,
.csapa-actions-page .page-heading h1:last-child {
  margin-bottom:0;
}

.csapa-about-page .association-focus-grid > div {
  background:#f3f3f3;
}

#contact-channels .contact-details {
  background:transparent;
  padding:0;
  align-self:start;
}
.contact-qr img {
  display:block;
  width:clamp(112px,15vw,160px);
  height:auto;
}
.contact-entry-list {
  border-top:1px solid #d8d8d8;
}
.contact-entry-list .service-card {
  display:flex;
  flex-flow:row wrap;
  align-items:flex-start;
  gap:clamp(16px,3vw,40px);
  padding:clamp(20px,3vw,32px) 0;
  border:0;
  border-bottom:1px solid #d8d8d8;
  border-radius:0;
  background:white;
}
.contact-entry-list .service-card:is(:hover,:focus-within) {
  box-shadow:none;
  transform:none;
}
.contact-entry-copy {
  flex:1 1 min(100%, 27rem);
  min-width:0;
}
.contact-entry-copy .entry-kind {
  padding:0;
  margin:0 0 4px;
  background:none;
  color:#595959;
  font-size:clamp(13px,1vw,15px);
}
.contact-entry-copy h3 {
  margin:0 0 8px;
  font-size:clamp(21px,2vw,29px);
  line-height:1.45;
}
.contact-entry-copy > p,
.contact-entry-copy .entry-details {
  margin:0 0 10px;
  font-size:clamp(15px,1.2vw,18px);
  line-height:1.75;
  overflow-wrap:anywhere;
}
.contact-entry-copy .button {
  max-width:100%;
  white-space:normal;
  background:#f3f3f3;
  border-color:#c8c8c8;
}
.contact-entry-list .service-card .qr-image {
  width:min(144px,100%);
  flex:none;
  margin:0;
}
.contact-entry-list .qr-image img {
  display:block;
  width:100%;
  height:auto;
}
/* A saved or homepage link can still open a published entry omitted from the list. */
.contact-entry-list .entry-link-only:not(:target),
.contact-entry-list:has(.entry-link-only:target) .empty-state {
  display:none;
}

/* Use the news list's rows and image ratio for the public project directory. */
.association-action-directory.association-news-rows {
  gap:18px;
}
.association-action-directory .association-directory-item {
  display:flex;
  align-items:stretch;
  gap:clamp(15px,2vw,30px);
}
.association-action-directory .association-directory-item > .association-row-photo {
  flex:none;
  width:29%;
  max-width:350px;
  height:auto;
  aspect-ratio:8 / 5;
  align-self:flex-start;
  object-fit:cover;
  border-radius:3px;
}
.association-action-directory .association-row-copy h2 {
  margin:4px 0 8px;
  font-size:clamp(19px,1.5vw,24px);
  line-height:1.5;
}
.association-action-directory .association-row-copy p {
  margin:0;
  color:#646464;
  font-size:clamp(16px,1.16vw,19px);
  line-height:1.7;
}
.association-action-directory .text-link {
  margin-top:12px;
  max-width:100%;
}
@media (min-width:1101px) {
  .csapa-actions-page .page-heading.wrap,
  .csapa-actions-page .page-body.wrap {
    width:min(var(--association-width),73vw,1280px);
  }
  .csapa-actions-page .page-body > .entry-content {
    max-width:none;
  }
}
@media (max-width:600px) {
  .association-action-directory .association-directory-item {
    flex-direction:column;
    gap:12px;
  }
  .association-action-directory .association-directory-item > .association-row-photo {
    width:100%;
    max-width:none;
  }
}

/* Association profile. The copy, photographs and links live in the page editor. */
.csapa-about-page {
  --profile-ink:#194e36;
  --profile-width:min(87.5%,1120px);
  background:white;
}
.csapa-about-page .page-heading.wrap, .csapa-about-page .page-body.wrap {
  width:var(--profile-width); max-width:none; margin-inline:auto;
}
.csapa-about-page .page-heading.wrap {
  padding-block:clamp(30px,4vw,66px) 18px;
}
.csapa-about-page .page-heading h1 {font-size:clamp(32px,3.4vw,50px);line-height:1.25;}
.csapa-about-page .page-body.wrap {display:block;padding-block:0 clamp(40px,5vw,80px);}
.csapa-about-page .page-body > .entry-content {width:100%;max-width:none;}
.csapa-about-page .entry-content > p {margin-block:8px;max-width:none;text-align:justify;text-align-last:start;font-size:clamp(15px,1.15vw,18px);line-height:1.8;}
.csapa-about-page .entry-content > .article-lead {border:0;background:none;padding:0;color:inherit;font-weight:500;}
.csapa-about-page .page-heading h1::after, .csapa-about-page .entry-content > h2::after {
  content:""; display:block; margin-top:9px; width:42px; height:3px; background:var(--profile-ink);
}
.csapa-about-page .entry-content > h2 {
  margin:clamp(26px,3vw,44px) 0 15px; padding:0; border:0;
  font-size:clamp(22px,2.15vw,32px); line-height:1.4; background:none;
}
.csapa-about-page .association-focus-grid {margin:0;gap:14px;}
.csapa-about-page .association-focus-grid > div {
  position:relative; border:1px solid #e2e5e2; border-radius:9px; background:#f4f4f4;
  padding:clamp(16px,1.8vw,25px) clamp(15px,2vw,26px) clamp(16px,1.8vw,25px) clamp(78px,7.7vw,111px);
  min-height:94px; align-content:center;
}
.csapa-about-page .association-focus-grid > div::before {
  content:""; position:absolute; top:50%; transform:translateY(-50%); left:clamp(14px,2vw,28px);
  width:clamp(44px,4.3vw,58px); aspect-ratio:1; border-radius:15px; background:#eee;
}
.csapa-about-page .association-focus-grid > div::after {
  content:""; position:absolute; top:50%; transform:translate(-50%,-50%); left:calc(clamp(14px,2vw,28px) + clamp(22px,2.15vw,29px));
  width:32px; aspect-ratio:1; background:url(about-work-icons.svg) 0 center / 400% 100% no-repeat;
}
.csapa-about-page .association-focus-grid > .work-education::after {background-position-x:33.333%;}
.csapa-about-page .association-focus-grid > .work-welfare::after {background-position-x:66.667%;}
.csapa-about-page .association-focus-grid > .work-industry::after {background-position-x:100%;}
#main .csapa-about-page .association-focus-grid h3,.csapa-about-page .association-focus-grid h3 {
  margin:0 0 4px; color:var(--public-ink); font-size:clamp(18px,1.5vw,22px); line-height:1.35;
}
.csapa-about-page .entry-content > .about-mission {
  background:#f4f4f4; border-left:3px solid #7b9a80; border-radius:0 6px 6px 0;
  padding:14px 20px; margin:0 0 14px; max-width:none; color:var(--public-ink); font-weight:600;
}
.about-activity-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.about-activity-grid > div {position:relative;border:1px solid #dfe4df;border-radius:8px;overflow:hidden;background:white;}
.about-activity-grid img {display:block;width:100%;aspect-ratio:2.12;object-fit:cover;}
.about-activity-grid p:has(>img) {margin:0;}
.about-activity-grid p:empty {display:none;}
.csapa-about-page .about-activity-grid h3 {margin:12px 40px 2px 14px;font-size:clamp(17px,1.35vw,21px);line-height:1.4;}
.csapa-about-page .about-activity-grid h3 a {color:var(--public-ink);text-decoration:none;}
.about-activity-grid h3 a::after {content:"";position:absolute;inset:0;}
.about-activity-grid h3 a::before {content:"→";position:absolute;right:12px;bottom:18px;color:var(--public-ink);font-size:18px;}
.csapa-about-page .about-activity-grid p:last-child {margin:2px 34px 13px 14px;font-size:14px;line-height:1.6;}
.about-activity-grid > div:focus-within {outline:2px solid var(--profile-ink);outline-offset:2px;}
.about-activity-grid > div:hover {border-color:#93a797;}
.csapa-about-page ul.association-timeline {max-width:none;list-style:none;margin:16px 0 0;padding:0 0 0 16px;}
.csapa-about-page ul.association-timeline li {text-wrap:balance;position:relative;display:grid;grid-template-columns:max-content 1fr;gap:18px;align-items:baseline;border-left:2px solid #87a38d;border-bottom:1px solid #e4e6e4;padding:8px 12px 8px 25px;}
.csapa-about-page ul.association-timeline li::before {content:"";position:absolute;left:-5px;top:1.25em;width:6px;height:6px;background:white;border:1.5px solid #47794e;border-radius:100%;}
.csapa-about-page ul.association-timeline strong {display:inline-block;background:#f4f4f4;color:var(--public-ink);border-radius:4px;padding:0 10px;margin:0;font-size:15px;}
@media(max-width:760px) {
  .csapa-about-page {--profile-width:90%;}
  .csapa-about-page .association-focus-grid {grid-template-columns:1fr;gap:10px;}
  .about-activity-grid {gap:9px;}
  .csapa-about-page .about-activity-grid h3 {margin-left:10px;}
}
@media(max-width:580px) {
  .about-activity-grid {grid-template-columns:1fr;}
  .about-activity-grid > div {display:grid;grid-template-columns:34% 1fr;grid-template-rows:auto auto;align-content:center;}
  .csapa-about-page .entry-content .about-activity-grid img,.about-activity-grid p:has(>img) {grid-column:1;grid-row:1 / 3;height:clamp(96px,26vw,140px);align-self:center;aspect-ratio:auto;}
  .about-activity-grid h3,.about-activity-grid p:last-child {grid-column:2;}
  .csapa-about-page ul.association-timeline li {gap:9px;padding-left:14px;}
  .csapa-about-page ul.association-timeline strong {padding-inline:6px;}
}
/* Contact uses the same full-width cover as the news centre. */
.association-contact-cover {min-height:clamp(275px,26vw,405px);align-items:end;background-color:#43372e;}
.association-contact-cover:before {background:linear-gradient(90deg,rgba(26,20,16,.64),rgba(26,20,16,.14) 85%);}
.association-contact-cover > img {object-position:50% 47%;}
.association-contact-cover .contact-cover-copy {padding-block:clamp(34px,4.8vw,76px) clamp(23px,2.8vw,42px);color:#fff;}
.association-contact-cover .contact-cover-copy h1 {font-size:clamp(32px,3.45vw,52px);line-height:1.22;margin:0 0 15px;color:white;}
.association-contact-cover .contact-cover-copy p {font-size:clamp(14px,1.05vw,17px);line-height:1.65;margin:4px 0;color:white;max-width:80ch;}
body.page:has(.association-contact-cover) :is(.participate-section.wrap,.office-contact.wrap,.csapa-message-section.wrap) {width:min(87.5%,1080px);max-width:none;margin-inline:auto;}
#contact-channels.office-contact {padding-block:12px 0;}
#contact-channels.office-contact .contact-details {display:flex;flex-wrap:wrap;align-items:start;gap:12px 22px;}
#contact-channels.office-contact .contact-details > div {padding:0;border:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;}
#contact-channels.office-contact :is(h2,p) {margin:0;font-size:16px;line-height:1.6;}
#contact-channels.office-contact .contact-qr {flex-direction:column;}
body.page:has(.association-contact-cover) .participate-section {padding-block:clamp(26px,4vw,62px) 0;}
body.page:has(.association-contact-cover) .csapa-message-section {display:block;padding-block:24px 50px;border:0;}
body.page:has(.association-contact-cover) .csapa-message-form {max-width:710px;}
@media(max-width:640px) {
  .association-contact-cover {min-height:280px;}
  .association-contact-cover > img {object-position:55% 48%;}
  body.page:has(.association-contact-cover) :is(.participate-section.wrap,.office-contact.wrap,.csapa-message-section.wrap) {width:90%;}
}

.csapa-action-tabs {
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:8px;
  margin:0 0 clamp(20px,3vw,36px);
  padding:0 0 16px;
  border-bottom:1px solid #d8d8d8;
}
.csapa-action-tabs a {
  display:inline-flex;
  align-items:center;
  max-width:100%;
  min-height:42px;
  padding:8px 16px;
  border-radius:3px;
  background:#f3f3f3;
  color:var(--ink);
  font-size:clamp(14px,1.2vw,16px);
  line-height:1.45;
  overflow-wrap:anywhere;
  text-decoration:none;
}
.csapa-action-tabs a:is([aria-current="page"], :hover, :focus-visible) {
  background:var(--public-selected);
  color:white;
}

/* Project rows contain optional links. Highlight the destination in place. */
.association-action-directory .text-link {
  background:transparent;
  color:var(--public-ink);
  text-decoration:none;
  border-bottom-color:currentColor;
}
@media (hover:hover) and (pointer:fine) {
  .association-action-directory .association-directory-item:hover .text-link {
    color:var(--public-ink);
    border-bottom-color:currentColor;
  }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .association-action-directory .association-directory-item:hover .text-link svg {
    transform:translateX(3px);
  }
}

.csapa-action-tabs a:not([aria-current="page"]):is(:hover,:focus-visible){background:var(--public-hover);color:var(--public-ink);}
