/*
Theme Name: Regal Rotaract
Theme URI: https://regalrotaract.org
Author: Esther H
Author URI: https://estherh.dev/
Description: Custom WordPress theme for the Rotaract Club of Regal, District 5040. Built on ACF Free (color/gallery via Post Object, no Repeater), Contact Form 7, and a custom Program/Partner CPT setup. See README.md for maintenance notes.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: regal-rotaract
*/

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--rr-white);
  color: var(--rr-body);
  font-family: var(--rr-font-base);
  font-weight: var(--rr-weight-medium);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link.screen-reader-text:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip: auto;
  z-index: 100;
  background: var(--rr-ink);
  color: var(--rr-white);
  font-weight: var(--rr-weight-bold);
  padding: 12px 18px;
  border-radius: var(--rr-radius-sm);
}

.container {
  max-width: var(--rr-container);
  margin: 0 auto;
  padding: 0 var(--rr-gutter);
}

/* ==========================================================================
   Site header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--rr-white);
  border-bottom: 1px solid var(--rr-line);
}

.site-header__inner {
  max-width: var(--rr-container);
  margin: 0 auto;
  padding: 0 var(--rr-gutter);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  flex: none;
}

.primary-menu__list {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--rr-text-nav);
  font-weight: var(--rr-weight-semibold);
  color: var(--rr-ink);
  cursor: pointer;
  transition: color var(--rr-transition);
}

.primary-menu__link:hover,
.primary-menu__link:focus-visible {
  color: var(--rr-cran);
}

/*
 * Current-page indicator. Targets the classes WP core adds automatically
 * for a real assigned menu: current-menu-item on the exact matching <li>,
 * current-menu-ancestor on a parent (e.g. "About") when one of its
 * children is the current page — > .primary-menu__link's direct-child
 * combinator excludes the badge link's own inner markup from ever
 * matching by accident, though an external link wouldn't get either
 * class anyway. Submenu items get the same background/border-left
 * treatment their :hover already uses, just permanently on.
 */
.primary-menu__item.current-menu-item > .primary-menu__link,
.primary-menu__item.current-menu-ancestor > .primary-menu__dropdown > .primary-menu__link {
  color: var(--rr-cran);
  box-shadow: 0 2px 0 0 var(--rr-cran);
}

.primary-menu__submenu-item.current-menu-item .primary-menu__submenu-link {
  background: var(--rr-mist);
  border-left-color: var(--rr-cran);
}

.primary-menu__dropdown {
  position: relative;
}

.primary-menu__dropdown summary.primary-menu__link {
  list-style: none;
}

.primary-menu__dropdown summary.primary-menu__link::-webkit-details-marker {
  display: none;
}

.primary-menu__dropdown summary.primary-menu__link::marker {
  content: '';
}

.primary-menu__dropdown[open] .primary-menu__chevron {
  transform: rotate(180deg);
}

.primary-menu__chevron {
  transition: transform var(--rr-transition);
}

.primary-menu__submenu {
  position: absolute;
  top: calc(100% + 16px);
  left: -16px;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--rr-white);
  border: 1px solid var(--rr-line);
  box-shadow: var(--rr-shadow-dropdown);
  z-index: 30;
}

.primary-menu__submenu-link {
  display: block;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: var(--rr-weight-semibold);
  color: var(--rr-ink);
  border-left: 3px solid transparent;
  transition: background var(--rr-transition), border-color var(--rr-transition);
}

.primary-menu__submenu-link:hover,
.primary-menu__submenu-link:focus-visible {
  background: var(--rr-mist);
  border-left-color: var(--rr-cran);
}

.primary-menu__toggle {
  display: none;
  order: 3;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  margin: -8px 0;
  color: var(--rr-ink);
  cursor: pointer;
}

.primary-menu__toggle-icon--close {
  display: none;
}

.primary-menu__toggle[aria-expanded="true"] .primary-menu__toggle-icon--open {
  display: none;
}

.primary-menu__toggle[aria-expanded="true"] .primary-menu__toggle-icon--close {
  display: block;
}

.primary-menu__item--badge .primary-menu__link {
  gap: 8px;
  font-size: 12.5px;
  font-weight: var(--rr-weight-bold);
  color: var(--rr-char);
  border: 1.5px solid var(--rr-line);
  padding: 8px 14px;
  border-radius: var(--rr-radius-sm);
  transition: border-color var(--rr-transition), color var(--rr-transition);
}

.primary-menu__item--badge .primary-menu__link:hover,
.primary-menu__item--badge .primary-menu__link:focus-visible {
  border-color: var(--rr-char);
  color: var(--rr-ink);
}

.primary-menu__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rr-cran);
}

@media (max-width: 900px) {
  .primary-menu__toggle {
    display: inline-flex;
  }

  .primary-menu__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px 0;
    background: var(--rr-white);
    border-bottom: 1px solid var(--rr-line);
    box-shadow: var(--rr-shadow-dropdown);
  }

  .primary-menu__list.is-open {
    display: flex;
  }

  .primary-menu__item {
    width: 100%;
  }

  .primary-menu__link {
    width: 100%;
    padding: 14px var(--rr-gutter);
  }

  .primary-menu__item--badge {
    padding: 10px var(--rr-gutter);
  }

  .primary-menu__item--badge .primary-menu__link {
    width: auto;
    padding: 8px 14px;
  }

  /* The desktop current-page box-shadow hugs the link's own box — fine
     inline in a horizontal bar, but the link goes width:100% here, so the
     same box-shadow would stretch into a heavy bar across the row. Bold
     text (further down) plus the submenu's background/border-left cue
     are enough on their own in a stacked list. */
  .primary-menu__item.current-menu-item > .primary-menu__link,
  .primary-menu__item.current-menu-ancestor > .primary-menu__dropdown > .primary-menu__link {
    box-shadow: none;
    font-weight: var(--rr-weight-bold);
  }

  /* No tap-to-expand here: the About group is always shown open, with its
     children indented underneath, so the hierarchy still reads at a glance
     in the already-vertical mobile panel. */
  .primary-menu__dropdown {
    position: static;
  }

  .primary-menu__dropdown summary.primary-menu__link {
    cursor: default;
  }

  .primary-menu__submenu {
    position: static;
    display: block !important;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }

  .primary-menu__submenu-link {
    padding: 12px var(--rr-gutter) 12px calc(var(--rr-gutter) + 16px);
  }
}

/* ==========================================================================
   Site footer
   ========================================================================== */

.site-footer {
  background: var(--rr-white);
  border-top: 1px solid var(--rr-line);
}

.site-footer__inner {
  max-width: var(--rr-container);
  margin: 0 auto;
  padding: var(--rr-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__logo {
  height: 55px;
  width: auto;
}

.site-footer__copyright {
  margin: 0;
  font-size: 13.5px;
  font-weight: var(--rr-weight-medium);
  color: var(--rr-muted);
}

@media (max-width: 760px) {
  .site-footer__logo {
    height: 36px;
  }
}

/* ==========================================================================
   index.php fallback
   ========================================================================== */

.page-heading {
  margin: 56px 0 32px;
  font-size: var(--rr-text-h1);
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: -.025em;
  color: var(--rr-ink);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-bottom: var(--rr-section-padding);
}

.post-list__item {
  border-bottom: 1px solid var(--rr-line);
  padding-bottom: 40px;
}

.post-list__title {
  margin: 0;
  font-size: var(--rr-text-h3);
  font-weight: var(--rr-weight-extrabold);
  color: var(--rr-ink);
}

.post-list__title a:hover,
.post-list__title a:focus-visible {
  color: var(--rr-cran);
}

.post-list__meta {
  margin: 8px 0 0;
  font-size: var(--rr-text-label);
  font-weight: var(--rr-weight-semibold);
  color: var(--rr-muted);
}

.post-list__excerpt {
  margin-top: 12px;
  font-size: var(--rr-text-body);
  line-height: 1.6;
  color: var(--rr-body);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: var(--rr-weight-bold);
  font-size: var(--rr-text-button);
  padding: 16px 28px;
  border-radius: var(--rr-radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--rr-transition), border-color var(--rr-transition), transform var(--rr-transition);
}

.button--primary {
  background: var(--rr-cran);
  color: var(--rr-white);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--rr-cran-dark);
}

.button--outline-light {
  background: transparent;
  color: var(--rr-white);
  padding: 14px 26px;
  border: 2px solid rgba(255, 255, 255, .45);
}

.button--outline-light:hover,
.button--outline-light:focus-visible {
  border-color: var(--rr-white);
}

.button--dark {
  background: var(--rr-ink);
  color: var(--rr-white);
  font-size: 15px;
  padding: 14px 24px;
}

.button--dark:hover,
.button--dark:focus-visible {
  background: var(--rr-cran);
}

.button--light {
  background: var(--rr-white);
  color: var(--rr-ink);
}

.button--light:hover,
.button--light:focus-visible {
  transform: translateY(-2px);
}

.button--outline-dark {
  background: transparent;
  color: var(--rr-white);
  padding: 14px 26px;
  border: 2px solid rgba(255, 255, 255, .75);
}

.button--outline-dark:hover,
.button--outline-dark:focus-visible {
  border-color: var(--rr-white);
}

/* ==========================================================================
   Section heading (title + lede + optional action, used across pages)
   ========================================================================== */

.section {
  background: var(--rr-white);
}

.section > .container {
  padding-top: 94px;
  padding-bottom: 94px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.section-heading__text {
  max-width: 640px;
}

.section-heading__title {
  margin: 0;
  font-size: var(--rr-text-h2-lg);
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: var(--rr-tracking-tight);
  color: var(--rr-ink);
  line-height: 1.02;
}

.section-heading__lede {
  margin: 18px 0 0;
  font-size: var(--rr-text-body);
  line-height: 1.6;
  color: var(--rr-body);
}

/* ==========================================================================
   Hero (homepage)
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--rr-ink-deep);
  color: var(--rr-white);
}

.hero__gear {
  position: absolute;
  top: 50%;
  right: -300px;
  transform: translateY(-50%);
  width: 820px;
  height: 820px;
  opacity: .06;
  pointer-events: none;
  user-select: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-top: 90px;
  padding-bottom: 88px;
}

.hero__title {
  margin: 0;
  font-size: var(--rr-text-h1-hero);
  line-height: .88;
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: var(--rr-tracking-tighter);
  color: var(--rr-white);
}

.hero__title-accent {
  color: var(--rr-cran);
}

.hero__subtitle {
  margin-top: 28px;
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: var(--rr-weight-bold);
  letter-spacing: -.01em;
  color: var(--rr-white);
}

.hero__lede {
  margin: 22px 0 0;
  max-width: 580px;
  font-size: var(--rr-text-body);
  line-height: 1.62;
  color: #C8C9CC;
}

.hero__actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Ticker (homepage, decorative brand marquee)
   ========================================================================== */

.ticker {
  background: var(--rr-cran);
  overflow: hidden;
  white-space: nowrap;
}

.ticker__track {
  display: inline-flex;
  width: max-content;
  padding: 16px 0;
  animation: rr-ticker 26s linear infinite;
}

@keyframes rr-ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
  }
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: .04em;
  color: var(--rr-white);
}

.ticker__item::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}

/* ==========================================================================
   Working alongside (homepage partner pills)
   ========================================================================== */

.working-alongside {
  background: var(--rr-mist);
  border-top: 1px solid var(--rr-line);
  border-bottom: 1px solid var(--rr-line);
}

.working-alongside__inner {
  padding-top: 56px;
  padding-bottom: 56px;
}

.working-alongside__eyebrow {
  font-size: var(--rr-text-eyebrow);
  font-weight: var(--rr-weight-bold);
  letter-spacing: var(--rr-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--rr-char);
  text-align: center;
}

.working-alongside__list {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.working-alongside__pill {
  font-size: 14px;
  font-weight: var(--rr-weight-semibold);
  color: var(--rr-ink);
  background: var(--rr-white);
  border: 1px solid var(--rr-line);
  padding: 10px 18px;
  border-radius: var(--rr-radius-pill);
}

/* ==========================================================================
   CTA band (cranberry, used across pages)
   ========================================================================== */

.cta-band {
  background: var(--rr-cran);
  color: var(--rr-white);
}

.cta-band__inner {
  padding-top: 88px;
  padding-bottom: 88px;
}

.cta-band__title {
  margin: 0;
  max-width: 680px;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: var(--rr-tracking-tight);
  line-height: 1;
}

.cta-band__lede {
  margin: 22px 0 0;
  max-width: 560px;
  font-size: var(--rr-text-body);
  line-height: 1.6;
  color: rgba(255, 255, 255, .95);
}

.cta-band__actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}


/* ==========================================================================
   Page hero (About, People, Partners, Programs)
   ========================================================================== */

.page-hero {
  background: var(--rr-mist);
  border-bottom: 1px solid var(--rr-line);
}

.error404 .page-hero {
  border-bottom: 0;
}

.page-hero__inner {
  max-width: var(--rr-container-narrow);
  padding-top: 66px;
  padding-bottom: 60px;
}

.page-hero__eyebrow {
  font-size: var(--rr-text-eyebrow);
  font-weight: var(--rr-weight-bold);
  letter-spacing: var(--rr-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--rr-cran);
}

.page-hero__title {
  margin: 14px 0 0;
  max-width: 780px;
  font-size: var(--rr-text-h1);
  line-height: 1.04;
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: -.025em;
  color: var(--rr-ink);
}

.page-hero__lede {
  margin: 20px 0 0;
  max-width: 640px;
  font-size: var(--rr-text-body-lg);
  line-height: 1.62;
  color: var(--rr-body);
}

/* ==========================================================================
   Program grid (Programs page)
   ========================================================================== */

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--rr-gap);
}

.program-card {
  display: flex;
  flex-direction: column;
  background: var(--rr-white);
  border: 1px solid var(--rr-line);
  border-radius: var(--rr-radius-md);
  padding: var(--rr-card-padding);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}

.program-card:hover,
.program-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--rr-shadow-card-hover);
  border-color: var(--rr-ink);
}

.program-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 7px;
  background: var(--rr-cran);
  color: var(--rr-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.program-card__category {
  margin-top: 18px;
  font-size: 11.5px;
  font-weight: var(--rr-weight-bold);
  letter-spacing: var(--rr-tracking-label);
  color: var(--rr-cran);
}

.program-card__title {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: var(--rr-weight-extrabold);
  color: var(--rr-ink);
  letter-spacing: -.01em;
}

.program-card__excerpt {
  margin: 11px 0 0;
  font-size: var(--rr-text-body-sm);
  line-height: 1.58;
  color: var(--rr-body);
}

.program-card__lead {
  margin-top: auto;
  padding-top: 18px;
  font-size: 13px;
  color: var(--rr-muted);
  font-weight: var(--rr-weight-semibold);
}

@media (max-width: 980px) {
  .program-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .program-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CTA band variants
   ========================================================================== */

.cta-band--centered .cta-band__inner--centered {
  max-width: 880px;
  text-align: center;
}

.cta-band__actions--centered {
  justify-content: center;
}

/* ==========================================================================
   Single Program
   ========================================================================== */

.program-hero {
  background: var(--rr-ink-deep);
  color: var(--rr-white);
}

.program-hero__inner {
  max-width: var(--rr-container-narrow);
  padding-top: 32px;
  padding-bottom: 70px;
}

.program-hero__breadcrumb {
  font-size: 13.5px;
  font-weight: var(--rr-weight-semibold);
  color: #9A9CA0;
}

.program-hero__breadcrumb a:hover,
.program-hero__breadcrumb a:focus-visible {
  color: var(--rr-cran);
}

.program-hero__breadcrumb span[aria-hidden] {
  margin: 0 8px;
  color: #6B6D71;
}

.program-hero__breadcrumb span[aria-current] {
  color: var(--rr-white);
}

.program-hero__category {
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: var(--rr-weight-bold);
  letter-spacing: var(--rr-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--rr-white);
  background: var(--rr-cran);
  padding: 7px 14px;
  border-radius: var(--rr-radius-pill);
}

@media (max-width: 600px) {
  .program-hero__category {
    display: inline-block;
    max-width: 100%;
    font-size: 10.5px;
    letter-spacing: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.program-hero__title {
  margin: 18px 0 0;
  max-width: 780px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.04;
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: -.025em;
}

.program-hero__lede {
  margin: 18px 0 0;
  max-width: 640px;
  font-size: var(--rr-text-body-lg);
  line-height: 1.6;
  color: #C8C9CC;
  font-weight: var(--rr-weight-medium);
}

.container--prose-program {
  max-width: 820px;
}

.program-body__heading {
  margin: 0;
  font-size: 24px;
  font-weight: var(--rr-weight-extrabold);
  color: var(--rr-ink);
  letter-spacing: -.01em;
}

.program-body__content {
  margin-top: 18px;
  font-size: var(--rr-text-body);
  line-height: 1.7;
  color: var(--rr-body);
}

.program-body__content p {
  margin: 0 0 18px;
}

.program-body__content p:last-child {
  margin-bottom: 0;
}

.program-body__subheading {
  margin: 38px 0 0;
  font-size: 19px;
  font-weight: var(--rr-weight-extrabold);
  color: var(--rr-ink);
}

.program-body__partners {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.program-partner-tag {
  font-size: 13.5px;
  font-weight: var(--rr-weight-semibold);
  color: var(--rr-ink);
  background: var(--rr-mist);
  border: 1px solid var(--rr-line);
  padding: 8px 14px;
  border-radius: var(--rr-radius-pill);
}

.program-gallery {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.program-gallery > a {
  display: block;
}

.program-gallery__item {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--rr-radius-lg);
}

.program-leads-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.program-lead-card {
  background: var(--rr-white);
  border: 1px solid var(--rr-line);
  border-radius: var(--rr-radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.program-lead-card__avatar,
.program-lead-card__avatar-photo {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.program-lead-card__avatar {
  background: var(--rr-cran);
  color: var(--rr-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--rr-weight-extrabold);
  font-size: 19px;
}

.program-lead-card__avatar-photo {
  object-fit: cover;
}

@media (max-width: 640px) {
  .program-lead-card {
    flex-direction: column;
  }

  .program-lead-card__avatar {
    display: none;
  }
}

.program-lead-card__label {
  font-size: 11.5px;
  font-weight: var(--rr-weight-bold);
  letter-spacing: var(--rr-tracking-label);
  color: var(--rr-cran);
}

.program-lead-card__name {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: var(--rr-weight-extrabold);
  color: var(--rr-ink);
}

.program-lead-card__bio {
  margin: 9px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--rr-muted);
  font-weight: var(--rr-weight-medium);
}

/* ==========================================================================
   Utilities (apply manually via "Additional CSS Class(es)" in the block
   editor, e.g. on a Group or Column block)
   ========================================================================== */

.card {
  border: 1px solid var(--rr-line);
  border-radius: var(--rr-radius-md);
  padding: var(--rr-card-padding);
}

/*
 * Icon boxes for What Happens at Regal's three pillar blocks. Apply
 * "icon-box icon-box--flag" (or --rocket / --globe) to an empty Group
 * block's Additional CSS Class(es) — no icon markup needed, the glyph
 * renders via a CSS mask so it can be any brand color through `color`.
 */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--rr-radius-sm);
  background: var(--rr-ink);
  color: var(--rr-cran);
}

.icon-box::before {
  content: '';
  display: block;
  width: 25px;
  height: 25px;
  background-color: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.icon-box--flag::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cline x1='4' x2='4' y1='22' y2='15'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cline x1='4' x2='4' y1='22' y2='15'/%3E%3C/svg%3E");
}

.icon-box--rocket::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E");
}

.icon-box--globe::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Generic page template (page.php) and block-editor content
   ========================================================================== */

.container--narrow {
  max-width: var(--rr-container-narrow);
}

.entry-content {
  font-size: var(--rr-text-body);
  line-height: 1.7;
  color: var(--rr-body);
}

/* Not scoped to direct children only — a heading/paragraph that's the
   first (or last) child inside a nested block (e.g. a Column inside a
   Columns block) shouldn't carry extra top/bottom margin either. */
.entry-content *:first-child {
  margin-top: 0;
}

.entry-content *:last-child {
  margin-bottom: 0;
}

.entry-content p {
  margin: 0 0 22px;
}

.entry-content h2 {
  margin: 48px 0 18px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: var(--rr-weight-extrabold);
  letter-spacing: -.015em;
  color: var(--rr-ink);
}

.entry-content h3 {
  margin: 38px 0 14px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: var(--rr-weight-extrabold);
  color: var(--rr-ink);
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 22px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/*
 * The content container itself is wide (--rr-container-narrow) so
 * block-editor Columns/Gallery/Table blocks can use the full width, but
 * plain text stays readable at prose width — only direct-child text
 * elements are narrowed and centered; nested content inside wide blocks
 * is left alone.
 */
.entry-content > p,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote {
  max-width: var(--rr-container-prose);
  width: 100%;
  margin-inline: auto;
}

/*
 * Apply manually via "Additional CSS Class(es)" to a heading (or other
 * direct-child text block) that introduces a wide Columns/Gallery section
 * below it, so the heading's edges line up with the wide content instead
 * of sitting narrower and centered at prose width.
 */
.entry-content > .full-width {
  max-width: none;
}

.entry-content a {
  color: var(--rr-cran);
  font-weight: var(--rr-weight-semibold);
  text-decoration: underline;
}

.entry-content a:hover,
.entry-content a:focus-visible {
  color: var(--rr-cran-dark);
}

.entry-content img {
  border-radius: var(--rr-radius-md);
  margin: 8px 0 22px;
}

.entry-content blockquote {
  margin: 0 0 22px;
  padding-left: 20px;
  border-left: 3px solid var(--rr-cran);
  font-style: italic;
  color: var(--rr-char);
}

/* ==========================================================================
   Partner grid (Partners page)
   ========================================================================== */

.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.partner-card {
  display: flex;
  flex-direction: column;
  background: var(--rr-white);
  border: 1px solid var(--rr-line);
  border-radius: var(--rr-radius-lg);
  overflow: hidden;
}

.partner-card__photo {
  aspect-ratio: 4 / 3;
  background: var(--rr-mist);
  color: var(--rr-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.partner-card__body {
  padding: 24px;
}

.partner-card__name {
  margin: 0;
  font-size: 19px;
  font-weight: var(--rr-weight-extrabold);
  color: var(--rr-ink);
  letter-spacing: -.01em;
}

.partner-card__role {
  margin-top: 6px;
  font-size: 12px;
  font-weight: var(--rr-weight-bold);
  letter-spacing: .05em;
  color: var(--rr-cran);
}

.partner-card__bio {
  margin: 13px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  font-weight: var(--rr-weight-medium);
  color: var(--rr-body);
}

@media (max-width: 980px) {
  .partner-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .partner-grid {
    grid-template-columns: 1fr;
  }
}

.cta-band__lede--centered {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Global mobile adjustments
   ========================================================================== */

@media (max-width: 600px) {
  :root {
    --rr-gutter: 16px;
    --rr-card-padding: 16px;
  }

  .hero__inner {
    padding-top: 56px;
    padding-bottom: 48px;
  }

  .section > .container {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .page-hero__inner {
    padding-top: 44px;
    padding-bottom: 36px;
  }

  .program-hero__inner {
    padding-top: 24px;
    padding-bottom: 44px;
  }

  .cta-band__inner {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading .button--dark {
    width: 100%;
    justify-content: center;
  }

  .program-lead-card,
  .partner-card__body {
    padding: 16px;
  }
}

/* ==========================================================================
   Contact form (Contact Form 7 output — .wpcf7-form, .wpcf7-form-control)
   ========================================================================== */

.wpcf7-form {
  max-width: 640px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  line-height: normal;
}

/* Name + Email share the first row; Subject, Message, and the submit
   button each take the full width below. Assumes the default CF7 field
   order (name, email, subject, message, submit) — adjust the nth-of-type
   indexes if the form's field order changes. */
.wpcf7-form > p:nth-of-type(3),
.wpcf7-form > p:nth-of-type(4),
.wpcf7-form > p:nth-of-type(5) {
  grid-column: 1 / -1;
}

/* The grid's own gap is the only spacing between fields — !important
   because CF7's own markup/CSS (verified: no margin rules of its own)
   wasn't the cause, but something was still winning over a plain reset. */
.wpcf7-form p {
  margin: 0 !important;
  line-height: 1;
}

.wpcf7-form label {
  display: block;
  font-size: 16px;
  font-weight: var(--rr-weight-bold);
  color: var(--rr-ink);
  margin: 0 !important;
}

.wpcf7-form-control-wrap {
  display: block;
}

.wpcf7-form-control {
  width: 100%;
  font-family: var(--rr-font-base);
  font-size: 15px;
  color: var(--rr-ink);
  background: var(--rr-white);
  border: 1.5px solid var(--rr-line);
  border-radius: var(--rr-radius-md);
  padding: 13px 14px;
  transition: border-color var(--rr-transition), box-shadow var(--rr-transition);
}

.wpcf7-form textarea.wpcf7-form-control {
  resize: vertical;
}

.wpcf7-form-control::placeholder {
  color: var(--rr-muted);
}

.wpcf7-form-control:focus {
  outline: none;
  border-color: var(--rr-cran);
  box-shadow: 0 0 0 3px rgba(212, 19, 103, .25);
}

.wpcf7-form-control.wpcf7-not-valid {
  border-color: #C0392B;
}

.wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 13px;
  color: #C0392B;
}

.wpcf7-response-output {
  margin: 18px 0 0;
  padding: 13px 14px;
  border-radius: var(--rr-radius-md);
  border: 1.5px solid var(--rr-line);
  font-size: 14px;
}

.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: auto;
  font-weight: var(--rr-weight-bold);
  font-size: var(--rr-text-button);
  color: var(--rr-white);
  background: var(--rr-cran);
  border: none;
  border-radius: var(--rr-radius-sm);
  padding: 15px 28px;
  cursor: pointer;
  transition: background var(--rr-transition);
}

.wpcf7-submit:hover,
.wpcf7-submit:focus-visible {
  background: var(--rr-cran-dark);
}

/* Only renders if the submit tag is a real <button> rather than CF7's
   default <input type="submit"> — replaced elements like <input> can't
   have pseudo-element content. */
button.wpcf7-submit::after {
  content: '→';
}

@media (max-width: 640px) {
  .wpcf7-form {
    grid-template-columns: 1fr;
  }

  .wpcf7-form > p:nth-of-type(3),
  .wpcf7-form > p:nth-of-type(4),
  .wpcf7-form > p:nth-of-type(5) {
    grid-column: auto;
  }
}
