/*
  WordPress glue. style.css is the main stylesheet; this file
  maps block editor, Contact Form 7 and admin bar markup onto it.
*/

/* ---------- Admin bar (logged-in users) ---------- */
.admin-bar .header,
.admin-bar .menu { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .header,
  .admin-bar .menu { top: 46px; }
}

/* WordPress prints width/height attributes on images; let aspect-ratio decide the height */
.staff-card__photo,
.profile__photo { height: auto; }

/* ---------- Page sections built from Group blocks (pattern "ANF section") ---------- */
.page-section > .wp-block-group__inner-container > * + * { margin-top: 1em; }
.page-section > .wp-block-group__inner-container > :is(p, ul, ol, blockquote, .wp-block-buttons) { max-width: var(--measure); }
.page-section__title:has(+ .page-section__sub) { margin-bottom: 0; }
.page-section > .wp-block-group__inner-container > .page-section__sub {
  margin-top: 4px;
  margin-bottom: var(--space-stack);
}

/* Image block with the "banner" class: the wide photo strip on About */
.wp-block-image.banner { aspect-ratio: auto; }
.wp-block-image.banner img {
  width: 100%;
  aspect-ratio: 1024 / 362;
  object-fit: cover;
}

/* Image block with the "qr" class: the LINE QR code on Contact */
.wp-block-image.qr { margin-block: var(--space-stack); }
.wp-block-image.qr img { width: 180px; height: auto; }

/* ---------- Blocks inside running text ---------- */
.prose figure,
.prose .wp-block-image { margin: 0; }
.prose ul,
.prose ol { padding-left: 1.5em; }
:is(.prose, .wp-block-group.page-section) p a:not([class]) {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* Button block looks like .button */
.wp-block-button .wp-block-button__link {
  display: inline-block;
  padding: 8px 32px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-link);
  line-height: 1.5;
  color: var(--gold);
  background: #fff;
  border: 1px solid var(--gold);
  border-radius: 0;
  transition: background-color 0.2s, color 0.2s;
}
.wp-block-button .wp-block-button__link:hover { color: #fff; background: var(--gold); }

/* ---------- Contact Form 7 (the form gets html_class="form") ---------- */
.wpcf7-form-control-wrap { display: block; }
.form textarea.wpcf7-textarea { height: 160px; } /* CF7 prints rows="10" */
.form input.wpcf7-submit {
  width: fit-content;
  padding: 8px 32px;
  font-family: var(--font-display);
  font-size: var(--fs-link);
  line-height: 1.5;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 0;
}
.form input.wpcf7-submit:hover { color: #fff; background: var(--gold); }
.wpcf7-not-valid-tip {
  margin-top: 4px;
  font-size: var(--fs-small);
  color: #b3261e;
}
.wpcf7 form .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: var(--cream);
  border: 0;
  border-left: 3px solid var(--gold);
}

/* ---------- Pagination on News ---------- */
.pagination {
  width: min(var(--measure), 100%);
  margin: calc(var(--space-stack) * 2) auto 0;
}
.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 1em;
  font-family: var(--font-display);
  font-weight: 500;
}
.pagination .current,
.pagination a:hover { color: var(--gold); }
