/*
 * Book Buddy Webinars — card grid.
 *
 * DERIVED FROM Book Buddy Connect's assets/bookbuddy.css. The shared part
 * below is that file with the namespace changed from .bbc- to .bbwb-, so a
 * webinar card and an event card are visibly the same component: same gold
 * cap, same navy, same 24px radius, same shadow ramp, same hover lift, same
 * Lexend type. Re-sync it if Connect's stylesheet changes.
 *
 * Webinar-only states (live, past, replay note) are appended at the end.
 */

.bbwb-wrap {
  /* Brand */
  --bbwb-gold:     #F4B400;   /* bars, borders, button fill — never small text */
  --bbwb-gold-ink: #8A6508;   /* the same gold darkened for text on white, which
                                #F4B400 is far too pale to be legible as */
  --bbwb-navy:     #07273A;

  /* Roles */
  --bbwb-text:     #07273A;
  --bbwb-soft:     #47606F;
  --bbwb-mute:     #8A99A3;
  --bbwb-line:     #ECE7DD;
  --bbwb-card:     #FFFFFF;
  --bbwb-thumb-bg: #F2EFE9;
  --bbwb-radius:   24px;

  color: var(--bbwb-text);
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0 0 2rem;
}

.bbwb-heading {
  margin: 0 0 1.6rem;
  color: var(--bbwb-navy);
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.01em;
}

.bbwb-grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* One column on phones regardless of the requested count, two at tablet width,
   the requested count only when there is genuinely room for it. */
@media (min-width: 560px) {
  .bbwb-cols-2, .bbwb-cols-3, .bbwb-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .bbwb-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bbwb-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.bbwb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bbwb-card);
  border: 1px solid var(--bbwb-line);
  border-radius: var(--bbwb-radius);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(7, 39, 58, .05);
  transition: transform .35s ease, box-shadow .35s ease;
}

/* The gold cap along the top edge. Above the thumbnail rather than behind it,
   so a card with an image still reads as the same component as one without. */
.bbwb-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 5px;
  background: var(--bbwb-gold);
  transition: height .35s ease;
}

.bbwb-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 70px rgba(7, 39, 58, .12);
}

.bbwb-card:hover::before { height: 7px; }

/* Hover lift only where hovering is a real gesture. On touch it would stick
   after a tap and leave one card raised for no reason. */
@media (hover: none) {
  .bbwb-card:hover { transform: none; box-shadow: 0 15px 40px rgba(7, 39, 58, .05); }
}

@media (prefers-reduced-motion: reduce) {
  .bbwb-card, .bbwb-card::before, .bbwb-btn { transition: none; }
  .bbwb-card:hover { transform: none; }
}

.bbwb-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bbwb-thumb-bg);
  overflow: hidden;
}

.bbwb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bbwb-body {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 2rem 1.9rem 1.9rem;
  flex: 1;
}

.bbwb-tag {
  align-self: flex-start;
  padding: .5rem 1.05rem;
  border: 1px solid var(--bbwb-gold);
  border-radius: 999px;
  background: transparent;
  color: var(--bbwb-gold-ink);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.bbwb-title {
  margin: .3rem 0 0;
  color: var(--bbwb-navy);
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
}

.bbwb-desc {
  margin: 0;
  color: var(--bbwb-soft);
  font-size: .98rem;
  line-height: 1.75;
}

.bbwb-meta {
  margin: 0;
  color: var(--bbwb-mute);
  font-size: .88rem;
  line-height: 1.5;
}

.bbwb-scarce {
  margin: 0;
  color: #B4552A;
  font-size: .85rem;
  font-weight: 600;
}

/* Pushed to the bottom so buttons line up across cards of unequal height. The
   rule above it repeats the card's hairline, matching the site's meta divider. */
.bbwb-foot {
  margin-top: auto;
  padding-top: 1.4rem;
  border-top: 1px solid var(--bbwb-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  flex-wrap: wrap;
}

.bbwb-price {
  color: var(--bbwb-navy);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.bbwb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.7rem;
  border: 0;
  border-radius: 14px;
  background: var(--bbwb-gold);
  color: var(--bbwb-navy) !important;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none !important;
  transition: background .3s ease, color .3s ease;
}

.bbwb-btn:hover,
.bbwb-btn:focus-visible {
  background: var(--bbwb-navy);
  color: #FFFFFF !important;
}

/* Keyboard users get a ring the gold fill cannot swallow. */
.bbwb-btn:focus-visible {
  outline: 3px solid var(--bbwb-gold);
  outline-offset: 3px;
}

.bbwb-btn-off,
.bbwb-btn-off:hover {
  background: #EDEAE3;
  color: var(--bbwb-mute) !important;
  cursor: default;
}

/* Event date chip, top-right of the card, clear of the gold cap. */
.bbwb-card-event .bbwb-date {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
  padding: .5rem .4rem .55rem;
  border-radius: 14px;
  background: var(--bbwb-navy);
  color: #FFFFFF;
  line-height: 1;
}

.bbwb-date-d { font-size: 1.35rem; font-weight: 800; }
.bbwb-date-m {
  margin-top: .2rem;
  color: var(--bbwb-gold);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Keep the title clear of the date chip. */
.bbwb-card-event .bbwb-body { padding-right: 5.4rem; }
.bbwb-card-event .bbwb-foot { padding-right: 0; }

/* Single call-to-action card: membership, consultation. Capped in width so it
   does not stretch into a banner on a wide page, and given more breathing room
   than a grid card because it is never seen next to a sibling. */
.bbwb-offer { max-width: 34rem; }

.bbwb-offer .bbwb-body { padding: 2.4rem 2.2rem 2.2rem; gap: .8rem; }

.bbwb-offer-title { font-size: 1.75rem; }

.bbwb-period {
  color: var(--bbwb-mute);
  font-size: .85rem;
  font-weight: 600;
}

.bbwb-empty {
  color: var(--bbwb-soft, #47606F);
  font-style: italic;
  margin: 1rem 0;
}

.bbwb-error {
  border-left: 4px solid #C0392B;
  background: #FDF1F0;
  color: #7A2018;
  padding: .85rem 1rem;
  border-radius: 8px;
  font-size: .9rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .bbwb-body                  { padding: 1.6rem 1.4rem 1.5rem; }
  .bbwb-card-event .bbwb-body  { padding-right: 5rem; }
  .bbwb-offer .bbwb-body       { padding: 1.8rem 1.5rem 1.6rem; }
  .bbwb-title                 { font-size: 1.3rem; }
  .bbwb-offer-title           { font-size: 1.45rem; }
  .bbwb-grid                  { gap: 1.6rem; }
  .bbwb-btn                   { width: 100%; }
}


/* =========================================================
 * WEBINAR-ONLY STATES
 * Appended, not woven in, so the shared block above stays a
 * clean copy of Connect's stylesheet.
 * ======================================================= */

/* A session happening right now: red cap and a pulsing tag, so it reads as
   urgent against a grid of ordinary gold-capped cards. */
.bbwb-card-live::before { background: #C0392B; }

.bbwb-tag-live {
  border-color: #C0392B;
  color: #C0392B;
}

.bbwb-tag-live::before {
  content: "";
  display: inline-block;
  width: .42rem;
  height: .42rem;
  margin-right: .45rem;
  border-radius: 50%;
  background: #C0392B;
  vertical-align: middle;
  animation: bbwb-pulse 1.6s ease-in-out infinite;
}

@keyframes bbwb-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

@media (prefers-reduced-motion: reduce) {
  .bbwb-tag-live::before { animation: none; }
}

/* A finished session stays legible but stops competing with what is on sale. */
.bbwb-card-past::before { background: var(--bbwb-line); }
.bbwb-card-past .bbwb-tag { border-color: var(--bbwb-mute); color: var(--bbwb-mute); }

/* The date chip on a past card loses the navy fill it uses when selling. */
.bbwb-card-past .bbwb-date { background: var(--bbwb-mute); }

/* Line under a call to action — e.g. how the join link is delivered. */
.bbwb-note {
  margin: .9rem 0 0;
  max-width: 46ch;
  color: var(--bbwb-mute);
  font-size: .85rem;
  line-height: 1.6;
}

/* ---------- single webinar ---------- */

.bbwb-single { max-width: 48rem; }

.bbwb-back {
  display: inline-block;
  margin-bottom: 1.3rem;
  color: var(--bbwb-mute);
  font-size: .9rem;
  text-decoration: none;
}

.bbwb-back:hover { color: var(--bbwb-gold-ink); }

.bbwb-hero {
  aspect-ratio: 16 / 9;
  margin-bottom: 1.6rem;
  border-radius: var(--bbwb-radius);
  overflow: hidden;
  background: var(--bbwb-thumb-bg);
  box-shadow: 0 15px 40px rgba(7, 39, 58, .05);
}

.bbwb-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bbwb-single-title {
  margin: .7rem 0 1rem;
  color: var(--bbwb-navy);
  font-size: 2.1rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.01em;
}

.bbwb-facts {
  margin: 0 0 1.8rem;
  padding: 0 0 1.4rem;
  border-bottom: 1px solid var(--bbwb-line);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2rem;
  color: var(--bbwb-soft);
  font-size: .95rem;
}

.bbwb-facts strong { color: var(--bbwb-navy); font-weight: 700; }

.bbwb-content { color: var(--bbwb-soft); font-size: 1rem; line-height: 1.8; }
.bbwb-content h3 {
  margin: 2rem 0 .7rem;
  color: var(--bbwb-navy);
  font-size: 1.25rem;
  font-weight: 700;
}
.bbwb-content p  { margin: 0 0 1.1rem; }
.bbwb-content ul { margin: 0 0 1.3rem; padding-left: 1.3rem; }
.bbwb-content li { margin-bottom: .45rem; }

.bbwb-cta { margin-top: 1.9rem; }

@media (max-width: 600px) {
  .bbwb-single-title { font-size: 1.6rem; }
  .bbwb-facts        { gap: .5rem 1.2rem; font-size: .9rem; }
}
