/* =====================================================================
   BHM Gift Membership Cards — stylesheet
   --------------------------------------------------------------------
   Loaded by the bhm-gift-membership-cards mu-plugin (lives next to
   bhm-gift-membership-cards.php in /wp-content/mu-plugins/).
   All rules are scoped to .bhm-gift-tiers / .bhm-gift-note so they
   don't bleed onto the rest of the site. Brand colours come from the
   existing rpmt theme palette (used in your ACF "box_colour" fields).
   ===================================================================== */

.bhm-gift-tiers {
  --bhm-ink:        #283545;
  --bhm-ink-soft:   #4a5667;
  --bhm-line:       #e7eaee;
  --bhm-orange:     #ff9113;
  --bhm-teal:       #00d8bd;
  --bhm-magenta:    #810045;
  --bhm-beige:      #d7ccbd;
  --bhm-paper:      #ffffff;
  --bhm-black:      #000000;
  --bhm-radius:     8px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
  margin: 24px 0 32px;
}

/* Card */
.bhm-gift-tiers .bhm-tier {
  position: relative;
  background: var(--bhm-paper);
  border: 1px solid var(--bhm-line);
  border-radius: var(--bhm-radius);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.bhm-gift-tiers .bhm-tier:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(40, 53, 69, 0.10);
}

/* Coloured top band */
.bhm-gift-tiers .bhm-tier-band {
  padding: 28px 28px 24px;
  color: var(--bhm-ink);
  border-top-left-radius: var(--bhm-radius);
  border-top-right-radius: var(--bhm-radius);
}
.bhm-gift-tiers .bhm-tier-band--teal    { background: var(--bhm-teal); }
.bhm-gift-tiers .bhm-tier-band--orange  { background: var(--bhm-orange); }
.bhm-gift-tiers .bhm-tier-band--magenta { background: var(--bhm-magenta); color: #fff; }

.bhm-gift-tiers .bhm-tier-name {
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: inherit;
  /* Reserve space for two lines so all three coloured bands match height
     regardless of which tier name wraps. (2 × line-height 1.1 = 2.2em.) */
  min-height: 2.2em;
}

.bhm-gift-tiers .bhm-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.bhm-gift-tiers .bhm-price-currency { font-size: 22px; font-weight: 600; }
.bhm-gift-tiers .bhm-price-amount {
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.025em;
}
.bhm-gift-tiers .bhm-price-period { font-size: 15px; font-weight: 600; opacity: 0.8; }

/* Featured ribbon */
.bhm-gift-tiers .bhm-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bhm-black);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(40, 53, 69, 0.18);
}

/* Body */
.bhm-gift-tiers .bhm-tier-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.bhm-gift-tiers .bhm-tier-tagline {
  font-size: 15px;
  color: var(--bhm-ink-soft);
  margin: 0 0 20px;
  line-height: 1.5;
}

.bhm-gift-tiers .bhm-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex-grow: 1;
}
.bhm-gift-tiers .bhm-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #283545;
  padding: 8px 0;
  border-top: 1px solid #e7eaee;
}
.bhm-gift-tiers .bhm-benefits li:first-child {
  border-top: none;
  padding-top: 4px;
}
.bhm-gift-tiers .bhm-benefits li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #283545;
}
.bhm-gift-tiers .bhm-benefits li strong { font-weight: 700; }

/* CTA — matches the existing BHM "cta-find-out-more-btn" two-tone style:
   dark-navy body with text on the left + a darker chevron tile on the right
   that uses the theme's existing chevron sprite. */
.bhm-gift-tiers .bhm-cta {
  position: relative;
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 20px 80px 20px 22px;
  background: #283545;
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bhm-gift-tiers .bhm-cta::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 64px;
  background-color: #000;
  background-image: url("/wp-content/themes/rpmt/assets/images/svgs/cta-find-out-more-arrow.svg");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 14px;
  transition: background-color 0.15s ease;
}
.bhm-gift-tiers .bhm-cta:hover {
  background: #000;
  color: #fff;
}
.bhm-gift-tiers .bhm-cta:hover::after {
  background-color: #283545;
}
.bhm-gift-tiers .bhm-cta:focus-visible {
  outline: 3px solid #ff9113;
  outline-offset: 3px;
}
.bhm-gift-tiers .bhm-cta-label {
  display: block;
}

/* Footer reassurance strip */
.bhm-gift-note {
  margin: 16px 0 32px;
  padding: 24px 28px;
  background: #d7ccbd;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  color: #283545;
}
.bhm-gift-note h3 {
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 6px;
  color: inherit;
}
.bhm-gift-note p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
.bhm-gift-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

/* Buy zone — Spektrix iframe target the cards anchor-link to.
   Background matches the Spektrix iframe's body colour (#f3f0eb) so the
   WordPress wrapper and the iframe content blend into one continuous panel. */
.bhm-gift-buy {
  margin: 32px 0 0;
  padding: 32px 0 0;
  background: #f3f0eb;
  /* Offset for any sticky header so the heading isn't hidden when scrolled into view */
  scroll-margin-top: 100px;
}
.bhm-gift-buy-heading {
  font-weight: 800;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 32px 6px;
  color: #283545;
}
/* Hide the browser focus outline when the heading is programmatically focused
   by the click handler (we only focus it for screen readers — sighted users
   don't need a visible ring around the heading). */
.bhm-gift-buy-heading:focus {
  outline: none;
}
.bhm-gift-buy-intro {
  margin: 0 32px 16px;
  font-size: 16px;
  color: #4a5667;
}
.bhm-gift-buy-iframe-wrap {
  background: transparent;
  margin: 0;
}

@media (max-width: 600px) {
  .bhm-gift-buy { padding-top: 24px; }
  .bhm-gift-buy-heading,
  .bhm-gift-buy-intro { margin-left: 20px; margin-right: 20px; }
}

/* Error / fallback message */
.bhm-gift-tiers-error {
  padding: 20px 24px;
  border: 1px solid #e7eaee;
  border-radius: 8px;
  background: #faf7f1;
  color: #283545;
  font-size: 15px;
  line-height: 1.55;
}
.bhm-gift-tiers-error a {
  color: inherit;
  text-decoration: underline;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 980px) {
  .bhm-gift-tiers {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .bhm-gift-tiers .bhm-price-amount { font-size: 48px; }
  .bhm-gift-note { flex-direction: column; gap: 12px; }
}
