/* ==========================================================================
   TRUE BOUNCE - component styles for every dynamic section.
   Consumes the "Night Court" tokens defined by the True Bounce theme.
   ========================================================================== */

/* ---------- Shared bits ---------- */
.tb-block-title {
  font-family: var(--tb-font-h, sans-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 var(--tb-lg, 44px);
  position: relative;
  padding-top: 18px;
}
.tb-block-title::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 48px; height: 3px; background: var(--tb-accent, #D9F53F); border-radius: 999px;
}
.tb-t-list + .tb-block-title { margin-top: var(--tb-xl, 80px); }

.tb-empty { color: var(--tb-muted, #8A9A8C); font-size: 0.98rem; }
.tb-paper .tb-empty { color: var(--tb-muted-ink, #5A6B5E); }
.tb-empty-card {
  border: 1px dashed rgba(138, 154, 140, 0.5);
  border-radius: var(--tb-r-sm, 4px);
  padding: var(--tb-lg, 44px);
  text-align: left;
}
.tb-empty-card p { color: var(--tb-muted, #8A9A8C); margin-bottom: var(--tb-md, 24px); max-width: 52ch; }
.tb-paper .tb-empty-card p { color: var(--tb-muted-ink, #5A6B5E); }
.tb-admin-only {
  border-left: 3px solid var(--tb-accent, #D9F53F);
  padding: 10px 0 10px 16px;
  font-size: 0.9rem;
}

.tb-ph {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 20px;
  border-radius: var(--tb-r-sm, 4px);
  background:
    repeating-linear-gradient(135deg, rgba(217, 245, 63, 0.06) 0 2px, transparent 2px 16px),
    linear-gradient(160deg, #1B241E 0%, #10170F 100%);
  border: 1px dashed rgba(217, 245, 63, 0.28);
  color: #C9D4C6;
}
.tb-ph span {
  font-family: var(--tb-font-h, sans-serif); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.tb-ph small { font-size: 0.7rem; color: #7F8E82; max-width: 22ch; line-height: 1.4; }
.tb-ph-poster { aspect-ratio: 3/4; }

.tb-chip {
  display: inline-flex; align-items: center;
  font-family: var(--tb-font-h, sans-serif); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 12px;
}
.tb-chip-live { background: var(--tb-accent, #D9F53F); color: var(--tb-ink, #0C110E); }
.tb-chip-past { border: 1px solid rgba(138, 154, 140, 0.6); color: var(--tb-muted, #8A9A8C); }

.tb-deflist { margin: 0; }
.tb-deflist dt {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--tb-muted-ink, #5A6B5E); margin-top: 16px;
}
.tb-dark .tb-deflist dt { color: var(--tb-muted, #8A9A8C); }
.tb-deflist dd { margin: 3px 0 0; font-size: 1rem; }
.tb-deflist-tight dt { margin-top: 12px; }

.tb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--tb-lg, 44px); }
.tb-filter {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: transparent; color: inherit;
  border: 1px solid rgba(138, 154, 140, 0.45);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tb-filter:hover { border-color: currentColor; }
.tb-filter.is-active { background: var(--tb-accent, #D9F53F); border-color: var(--tb-accent, #D9F53F); color: var(--tb-ink, #0C110E); }

.tb-align-center { justify-content: center; }
.tb-wa-pair .tb-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Hero (composed in Elementor with these classes) ---------- */
.tb-hero { position: relative; overflow: hidden; }
.tb-hero-bg { position: absolute; inset: 0; z-index: 0; }
.tb-hero-bg img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.tb-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(12, 17, 14, 0.94) 0%, rgba(12, 17, 14, 0.86) 38%, rgba(12, 17, 14, 0.35) 100%);
}
.tb-hero > .tb-wrap, .tb-hero-inner { position: relative; z-index: 2; }

.tb-hero-copy { max-width: 660px; padding: clamp(80px, 12vh, 150px) 0 clamp(70px, 10vh, 120px); }
.tb-hero-copy h1 { margin-bottom: 20px; }
.tb-hero-copy h1 em { font-style: normal; color: var(--tb-accent, #D9F53F); }
.tb-hero-sub { font-size: 1.15rem; color: rgba(242, 244, 238, 0.86); max-width: 48ch; margin-bottom: 32px; }
.tb-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

/* ---------- Why True Bounce (asymmetric bento) ---------- */
.tb-why { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--tb-line, #26302A); border: 1px solid var(--tb-line, #26302A); border-radius: var(--tb-r-sm, 4px); overflow: hidden; }
.tb-why > * { background: var(--tb-bg, #0C110E); padding: 34px 30px; }
.tb-why-lead { grid-column: span 3; }
.tb-why-tall { grid-column: span 3; }
.tb-why-item { grid-column: span 2; }
.tb-why h3 { font-size: 1.15rem; margin-bottom: 10px; }
.tb-why p { color: var(--tb-muted, #8A9A8C); font-size: 0.96rem; margin: 0; }

/* ---------- Programs ---------- */
.tb-programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tb-md, 24px); }
.tb-program {
  border: 1px solid var(--tb-line-ink, rgba(12,17,14,.12));
  border-radius: var(--tb-r-sm, 4px);
  overflow: hidden;
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, 0.4);
}
.tb-dark .tb-program { border-color: var(--tb-line, #26302A); background: var(--tb-surface, #141B16); }
.tb-program-media img, .tb-program-media .tb-ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0; }
.tb-program-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tb-program-body h3 { margin: 0; font-size: 1.3rem; }
.tb-program-body p { margin: 0; font-size: 0.97rem; }
.tb-program-meta {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E);
}
.tb-dark .tb-program-meta { color: var(--tb-muted, #8A9A8C); }
.tb-program-body .tb-btn { align-self: flex-start; margin-top: auto; }
.tb-program-wide { grid-column: span 2; flex-direction: row; }
.tb-program-wide .tb-program-media { flex: 0 0 46%; }
.tb-program-wide .tb-program-media img, .tb-program-wide .tb-program-media .tb-ph { height: 100%; aspect-ratio: auto; min-height: 280px; }
.tb-program-wide .tb-program-body { justify-content: center; }
.tb-program-wide h3 { font-size: 1.7rem; }

/* ---------- Tournaments ---------- */
.tb-t-list { display: flex; flex-direction: column; gap: var(--tb-md, 24px); }
.tb-t-card {
  display: grid; grid-template-columns: 200px 1fr; gap: var(--tb-md, 24px);
  padding-bottom: var(--tb-md, 24px);
  border-bottom: 1px solid var(--tb-line-ink, rgba(12,17,14,.12));
  align-items: start;
}
.tb-dark .tb-t-card { border-color: var(--tb-line, #26302A); }
.tb-t-card:last-child { border-bottom: 0; padding-bottom: 0; }
.tb-t-media img, .tb-t-media .tb-ph { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.tb-t-body h3 { margin: 0 0 8px; font-size: 1.45rem; }
.tb-t-body h3 a:hover { color: var(--tb-accent-dim, #B9D22F); }
.tb-t-meta {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E);
  margin: 0 0 12px;
}
.tb-dark .tb-t-meta { color: var(--tb-muted, #8A9A8C); }
.tb-t-excerpt { margin: 0 0 14px; font-size: 0.98rem; }
.tb-t-link {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 2px solid var(--tb-accent, #D9F53F); padding-bottom: 3px;
}
.tb-t-link:hover { color: var(--tb-accent-dim, #B9D22F); }

.tb-t-single { display: grid; grid-template-columns: 360px 1fr; gap: var(--tb-lg, 44px); align-items: start; }
.tb-t-single-media img, .tb-t-single-media .tb-ph { width: 100%; }
.tb-t-desc { margin-top: var(--tb-lg, 44px); }
.tb-t-results {
  margin-top: var(--tb-lg, 44px); padding: var(--tb-md, 24px);
  border-left: 3px solid var(--tb-accent, #D9F53F);
  background: rgba(217, 245, 63, 0.08);
  border-radius: 0 var(--tb-r-sm, 4px) var(--tb-r-sm, 4px) 0;
}
.tb-t-results h2 { font-size: 1.4rem; margin-bottom: 12px; margin-top: 0; }

/* ---------- Gallery ---------- */
.tb-albums { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tb-md, 24px); }
.tb-album { display: block; }
.tb-album-media { display: block; overflow: hidden; border-radius: var(--tb-r-sm, 4px); }
.tb-album-media img, .tb-album-media .tb-ph {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--tb-r-sm, 4px);
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tb-album:hover .tb-album-media img { transform: scale(1.04); }
.tb-album-body { display: block; padding-top: 14px; }
.tb-album-title { display: block; font-family: var(--tb-font-h, sans-serif); font-weight: 700; font-size: 1.05rem; }
.tb-album-meta {
  display: block; margin-top: 4px; font-size: 0.76rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E);
}
.tb-dark .tb-album-meta { color: var(--tb-muted, #8A9A8C); }
.tb-albums .tb-album:first-child { grid-column: span 2; grid-row: span 2; }
.tb-albums .tb-album:first-child .tb-album-media img,
.tb-albums .tb-album:first-child .tb-album-media .tb-ph { aspect-ratio: 3/2; }
.tb-albums .tb-album:first-child .tb-album-title { font-size: 1.4rem; }

.tb-photogrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tb-photo { display: block; overflow: hidden; border-radius: var(--tb-r-sm, 4px); }
.tb-photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--tb-r-sm, 4px); transition: transform 0.45s ease, opacity 0.2s; }
.tb-photo:hover img { transform: scale(1.05); opacity: 0.9; }

.tb-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(8, 12, 9, 0.96);
  display: none; align-items: center; justify-content: center; padding: 40px 20px;
}
.tb-lightbox.is-open { display: flex; }
.tb-lightbox img { max-width: min(1200px, 94vw); max-height: 86vh; width: auto; object-fit: contain; }
.tb-lightbox-close, .tb-lightbox-prev, .tb-lightbox-next {
  position: absolute; background: transparent; border: 1px solid rgba(242, 244, 238, 0.4);
  color: #F2F4EE; width: 46px; height: 46px; border-radius: 999px; cursor: pointer;
  font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.tb-lightbox-close { top: 20px; right: 20px; }
.tb-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.tb-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.tb-lightbox-close:hover, .tb-lightbox-prev:hover, .tb-lightbox-next:hover { border-color: var(--tb-accent, #D9F53F); color: var(--tb-accent, #D9F53F); }

/* ---------- Videos ---------- */
.tb-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tb-md, 24px); }
.tb-video-play {
  display: block; position: relative; width: 100%; padding: 0; border: 0; cursor: pointer;
  background: transparent; border-radius: var(--tb-r-sm, 4px); overflow: hidden;
}
.tb-video-play img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--tb-r-sm, 4px); }
.tb-video-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--tb-accent, #D9F53F);
  transition: transform 0.2s ease;
}
.tb-video-btn::after {
  content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--tb-ink, #0C110E);
}
.tb-video-play:hover .tb-video-btn { transform: translate(-50%, -50%) scale(1.08); }
.tb-video-body { padding-top: 14px; }
.tb-video-body h3 { margin: 0 0 6px; font-size: 1.08rem; }
.tb-video-body p { margin: 0; font-size: 0.94rem; }
.tb-video-cat {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E); margin-bottom: 6px;
}
.tb-dark .tb-video-cat { color: var(--tb-muted, #8A9A8C); }
.tb-video-modal {
  position: fixed; inset: 0; z-index: 9999; background: rgba(8, 12, 9, 0.96);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.tb-video-modal.is-open { display: flex; }
.tb-video-modal .tb-video-frame { width: min(1100px, 94vw); aspect-ratio: 16/9; }
.tb-video-modal iframe { width: 100%; height: 100%; border: 0; border-radius: var(--tb-r-sm, 4px); }

/* ---------- Book a court ---------- */
.tb-book-lede { margin-bottom: var(--tb-lg, 44px); }
.tb-book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tb-md, 24px); }
.tb-book-card {
  border: 1px solid var(--tb-line, #26302A);
  border-radius: var(--tb-r-sm, 4px); overflow: hidden;
  background: var(--tb-surface, #141B16);
  display: flex; flex-direction: column;
}
.tb-paper .tb-book-card { background: #fff; border-color: var(--tb-line-ink, rgba(12,17,14,.12)); }
.tb-book-media img, .tb-book-media .tb-ph { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 0; }
.tb-book-body { padding: 30px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tb-book-eyebrow {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--tb-muted, #8A9A8C); margin: 0;
}
.tb-paper .tb-book-eyebrow { color: var(--tb-muted-ink, #5A6B5E); }
.tb-book-body h3 { margin: 0; font-size: 1.7rem; text-transform: uppercase; }
.tb-book-body address { font-style: normal; font-size: 0.96rem; line-height: 1.6; margin: 0; }
.tb-book-body .tb-btn-row { margin-top: auto; padding-top: 8px; }
.tb-book-note { margin-top: var(--tb-md, 24px); font-size: 0.86rem; color: var(--tb-muted, #8A9A8C); }
.tb-paper .tb-book-note { color: var(--tb-muted-ink, #5A6B5E); }

/* ---------- Locations ---------- */
.tb-locations { display: flex; flex-direction: column; gap: var(--tb-xl, 80px); }
.tb-loc { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--tb-lg, 44px); align-items: center; }
.tb-loc-flip .tb-loc-media { order: 2; }
.tb-loc-media iframe { width: 100%; aspect-ratio: 4/3; border: 0; border-radius: var(--tb-r-sm, 4px); }
.tb-loc-eyebrow {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E); margin: 0 0 6px;
}
.tb-dark .tb-loc-eyebrow { color: var(--tb-muted, #8A9A8C); }
.tb-loc-body h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); text-transform: uppercase; margin: 0 0 12px; }
.tb-loc-body address { font-style: normal; font-size: 1.02rem; line-height: 1.65; margin: 0 0 8px; max-width: 44ch; }
.tb-loc-body .tb-btn-row { margin-top: var(--tb-md, 24px); }

/* ---------- Stats ---------- */
.tb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tb-md, 24px); }
.tb-stat { border-top: 2px solid var(--tb-accent, #D9F53F); padding-top: 18px; }
.tb-stat-n {
  display: block; font-family: var(--tb-font-h, sans-serif); font-weight: 800;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem); line-height: 1; letter-spacing: -0.03em;
}
.tb-stat-l {
  display: block; margin-top: 10px; font-size: 0.76rem; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--tb-muted, #8A9A8C);
}
.tb-paper .tb-stat-l { color: var(--tb-muted-ink, #5A6B5E); }

/* ---------- Testimonials ---------- */
.tb-quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tb-lg, 44px); }
.tb-quote { margin: 0; padding-top: 24px; border-top: 1px solid var(--tb-line, #26302A); }
.tb-paper .tb-quote { border-color: var(--tb-line-ink, rgba(12,17,14,.12)); }
.tb-quote blockquote { margin: 0 0 18px; font-size: 1.15rem; line-height: 1.55; }
.tb-quote blockquote p { margin: 0 0 10px; }
.tb-quote figcaption { font-family: var(--tb-font-h, sans-serif); font-size: 0.8rem; letter-spacing: 0.04em; }
.tb-quote figcaption strong { text-transform: uppercase; }
.tb-quote figcaption span { display: block; color: var(--tb-muted, #8A9A8C); font-weight: 500; margin-top: 3px; }
.tb-paper .tb-quote figcaption span { color: var(--tb-muted-ink, #5A6B5E); }

/* ---------- Contact ---------- */
.tb-contact-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tb-lg, 44px); }
.tb-contact-block h3 { font-size: 1.15rem; text-transform: uppercase; margin-bottom: 14px; }
.tb-contact-block address { font-style: normal; line-height: 1.65; margin: 0 0 16px; }
.tb-contact-coach {
  font-family: var(--tb-font-h, sans-serif); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; font-size: 0.85rem; margin-bottom: 10px;
}
.tb-contact-phone {
  display: block; font-family: var(--tb-font-h, sans-serif); font-weight: 800;
  font-size: 1.35rem; letter-spacing: -0.01em;
}
.tb-contact-phone:hover { color: var(--tb-accent-dim, #B9D22F); }
.tb-contact-hours { font-size: 0.9rem; color: var(--tb-muted, #8A9A8C); }
.tb-paper .tb-contact-hours { color: var(--tb-muted-ink, #5A6B5E); }

/* ---------- Forms ---------- */
.tb-form, .tb-formwrap { max-width: 780px; }
.tb-form fieldset { border: 0; padding: 0; margin: 0 0 var(--tb-lg, 44px); }
.tb-form legend {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E);
  padding: 0 0 14px; border-bottom: 1px solid var(--tb-line-ink, rgba(12,17,14,.12));
  width: 100%; margin-bottom: 22px;
}
.tb-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 22px; }
.tb-f { margin: 0; }
.tb-f label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 7px; }
.tb-f input, .tb-f select, .tb-f textarea,
.tb-formwrap input, .tb-formwrap select, .tb-formwrap textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 0.98rem;
  border: 1px solid rgba(12, 17, 14, 0.2); border-radius: var(--tb-r-sm, 4px);
  background: #fff; color: var(--tb-ink, #0C110E);
}
.tb-f input:focus, .tb-f select:focus, .tb-f textarea:focus {
  outline: 2px solid var(--tb-accent, #D9F53F); outline-offset: 1px; border-color: transparent;
}
.tb-consent { display: flex; margin: 0 0 var(--tb-md, 24px); }
.tb-consent label { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9rem; line-height: 1.55; }
.tb-consent input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.tb-consent a { text-decoration: underline; text-underline-offset: 3px; }
.tb-form-note { font-size: 0.84rem; color: var(--tb-muted-ink, #5A6B5E); margin-top: 16px; }
.tb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tb-form-error {
  border-left: 3px solid #B3261E; background: rgba(179, 38, 30, 0.08);
  padding: 14px 18px; margin-bottom: var(--tb-md, 24px); color: #7A1810; font-size: 0.95rem;
}
.tb-form-success {
  border-left: 3px solid var(--tb-accent, #D9F53F); background: rgba(217, 245, 63, 0.12);
  padding: 26px 28px; border-radius: 0 var(--tb-r-sm, 4px) var(--tb-r-sm, 4px) 0;
}
.tb-form-success h3 { margin-top: 0; font-size: 1.3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .tb-programs, .tb-albums, .tb-videos, .tb-contact-details { grid-template-columns: repeat(2, 1fr); }
  .tb-program-wide { grid-column: span 2; }
  .tb-albums .tb-album:first-child { grid-column: span 2; grid-row: auto; }
  .tb-photogrid { grid-template-columns: repeat(3, 1fr); }
  .tb-why-lead, .tb-why-tall { grid-column: span 6; }
  .tb-why-item { grid-column: span 3; }
  .tb-t-single { grid-template-columns: 280px 1fr; }
}

@media (max-width: 782px) {
  .tb-programs, .tb-albums, .tb-videos, .tb-book-grid, .tb-contact-details, .tb-quotes,
  .tb-form-grid { grid-template-columns: 1fr; }
  .tb-stats { grid-template-columns: repeat(2, 1fr); }
  .tb-photogrid { grid-template-columns: repeat(2, 1fr); }
  .tb-program-wide { grid-column: auto; flex-direction: column; }
  .tb-program-wide .tb-program-media { flex: none; }
  .tb-program-wide .tb-program-media img, .tb-program-wide .tb-program-media .tb-ph { aspect-ratio: 4/3; min-height: 0; }
  .tb-albums .tb-album:first-child { grid-column: auto; }
  .tb-t-card { grid-template-columns: 110px 1fr; gap: 16px; }
  .tb-t-single { grid-template-columns: 1fr; }
  .tb-loc, .tb-loc-flip { grid-template-columns: 1fr; }
  .tb-loc-flip .tb-loc-media { order: 0; }
  .tb-why-item, .tb-why-lead, .tb-why-tall { grid-column: span 6; }
  .tb-hero-copy { max-width: none; }
  .tb-lightbox-prev { left: 8px; }
  .tb-lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
  .tb-t-card { grid-template-columns: 1fr; }
  .tb-t-media img, .tb-t-media .tb-ph { aspect-ratio: 4/3; }
  .tb-photogrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ==========================================================================
   Elementor bridge: styles for the widgets used inside Elementor pages.
   ========================================================================== */

/* Buttons built with the Elementor Button widget. The class sits on the
   wrapper, so the anchor inside is what gets styled. */
.tb-btnw .elementor-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--tb-font-h, sans-serif); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
  padding: 16px 32px; border-radius: 999px; border: 1px solid transparent;
  background: var(--tb-accent, #D9F53F); color: var(--tb-ink, #0C110E);
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-shadow: none;
}
.tb-btnw .elementor-button:hover,
.tb-btnw .elementor-button:focus { background: var(--tb-accent-dim, #B9D22F); color: var(--tb-ink, #0C110E); }
.tb-btnw .elementor-button:active { transform: translateY(1px); }

.tb-btnw-ghost .elementor-button {
  background: transparent; color: var(--tb-paper, #F2F4EE);
  border-color: rgba(242, 244, 238, 0.45);
}
.tb-btnw-ghost .elementor-button:hover,
.tb-btnw-ghost .elementor-button:focus {
  background: rgba(242, 244, 238, 0.08); border-color: var(--tb-paper, #F2F4EE); color: var(--tb-paper, #F2F4EE);
}
.tb-paper .tb-btnw-ghost .elementor-button {
  color: var(--tb-ink, #0C110E); border-color: rgba(12, 17, 14, 0.3);
}
.tb-paper .tb-btnw-ghost .elementor-button:hover,
.tb-paper .tb-btnw-ghost .elementor-button:focus {
  background: rgba(12, 17, 14, 0.05); border-color: var(--tb-ink, #0C110E); color: var(--tb-ink, #0C110E);
}

/* A row of Elementor buttons sitting side by side. */
.tb-btnrow { flex-direction: row; flex-wrap: wrap; align-items: center; }
.tb-btnrow > .elementor-element { width: auto; flex: 0 0 auto; }

/* Page heads on Elementor pages. */
.tb-pagehead-el { position: relative; overflow: hidden; }
.tb-pagehead-el h1 { max-width: 18ch; }
.tb-pagehead-el .elementor-widget-text-editor { font-size: 1.15rem; color: var(--tb-muted, #8A9A8C); max-width: 60ch; }

/* Hero: faint court lines show through until a photograph is set. */
.tb-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(52% - 1px), rgba(242, 244, 238, 0.08) 52%, transparent calc(52% + 1px)),
    linear-gradient(0deg, transparent calc(74% - 1px), rgba(242, 244, 238, 0.06) 74%, transparent calc(74% + 1px)),
    linear-gradient(0deg, transparent calc(26% - 1px), rgba(242, 244, 238, 0.05) 26%, transparent calc(26% + 1px));
}
.tb-hero > .e-con-inner, .tb-hero > .elementor-widget-wrap { position: relative; z-index: 2; }
.tb-hero .elementor-element { position: relative; z-index: 2; }
.tb-hero-copy h1 { margin-bottom: 20px; }
.tb-hero-copy .elementor-widget-text-editor { font-size: 1.15rem; color: rgba(242, 244, 238, 0.86); max-width: 48ch; }

/* An image slot the owner fills from Elementor. Shows a branded pattern
   until a background image is chosen, so nothing ever looks broken. */
.tb-ph-slot {
  background-image:
    repeating-linear-gradient(135deg, rgba(217, 245, 63, 0.05) 0 2px, transparent 2px 18px),
    linear-gradient(160deg, #1B241E 0%, #10170F 100%);
  background-size: cover;
  border: 1px dashed rgba(217, 245, 63, 0.25);
  border-radius: var(--tb-r-sm, 4px);
  min-height: 420px;
}

/* Why True Bounce bento spans. */
.tb-why-4 { grid-column: span 4; }
.tb-why-2 { grid-column: span 2; }
.tb-why-6 { grid-column: span 6; }
.tb-why-6 h3 { font-size: 1.4rem; }

/* Closing call to action. */
.tb-cta-final { border-top: 3px solid var(--tb-accent, #D9F53F); }
.tb-cta-final h2 { max-width: 20ch; }

/* Two column splits used on Elementor pages. */
.tb-split { align-items: center; }

@media (max-width: 1024px) {
  .tb-why-4, .tb-why-2, .tb-why-6 { grid-column: span 3; }
}
@media (max-width: 782px) {
  .tb-why-4, .tb-why-2, .tb-why-6 { grid-column: span 6; }
  .tb-ph-slot { min-height: 260px; }
  .tb-btnrow > .elementor-element { width: 100%; }
  .tb-btnrow .elementor-button { width: 100%; }
}

/* ==========================================================================
   Fixes that must outrank Elementor's own container rules.
   ========================================================================== */

/* The Why bento is a grid, and Elementor containers default to flex. */
.e-con.tb-why, .elementor-element.tb-why {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--tb-line, #26302A);
  border: 1px solid var(--tb-line, #26302A);
  border-radius: var(--tb-r-sm, 4px);
  overflow: hidden;
}
.tb-why > .e-con, .tb-why > .elementor-element {
  background: var(--tb-bg, #0C110E);
  padding: 34px 30px;
}
@media (max-width: 1024px) { .e-con.tb-why, .elementor-element.tb-why { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 782px)  { .e-con.tb-why, .elementor-element.tb-why { grid-template-columns: 1fr; } .tb-why-4, .tb-why-2, .tb-why-6 { grid-column: auto; } }

/* Sections whose only content is a shortcode carry their padding inside the
   shortcode, so an empty section collapses instead of leaving a blank band. */
.tb-quotes-block { padding: 112px 0; }
@media (max-width: 1024px) { .tb-quotes-block { padding: 88px 0; } }
@media (max-width: 782px)  { .tb-quotes-block { padding: 64px 0; } }

/* Keep the hero inside the first screen. */
.tb-hero-copy { padding: clamp(48px, 7vh, 84px) 0; }

/* A single statistic should not stretch across the page. */
.tb-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ==========================================================================
   Fluent Forms, dressed in the True Bounce design system.
   ========================================================================== */

.tb-formwrap .frm-fluent-form { max-width: 780px; }
.tb-formwrap .ff-el-group { margin-bottom: 20px; }
.tb-formwrap .ff-el-input--label label {
  display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 7px; line-height: 1.4;
}
.tb-formwrap .ff-el-is-required.asterisk-right label:after { color: #B3261E; margin-left: 3px; }

.tb-formwrap .ff-el-form-control,
.tb-formwrap input[type="text"],
.tb-formwrap input[type="email"],
.tb-formwrap input[type="tel"],
.tb-formwrap select,
.tb-formwrap textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 0.98rem;
  border: 1px solid rgba(12, 17, 14, 0.2); border-radius: var(--tb-r-sm, 4px);
  background: #fff; color: var(--tb-ink, #0C110E); box-shadow: none; height: auto; min-height: 0;
}
.tb-formwrap .ff-el-form-control:focus,
.tb-formwrap select:focus,
.tb-formwrap textarea:focus {
  outline: 2px solid var(--tb-accent, #D9F53F); outline-offset: 1px; border-color: transparent; box-shadow: none;
}

/* The section headings inserted as custom HTML blocks. */
.tb-ff-legend {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E);
  padding: 0 0 14px; border-bottom: 1px solid var(--tb-line-ink, rgba(12,17,14,.12));
  margin: 8px 0 24px;
}
.tb-dark .tb-ff-legend { color: var(--tb-muted, #8A9A8C); border-bottom-color: var(--tb-line, #26302A); }
.tb-formwrap .ff-el-group:not(:first-child) .tb-ff-legend { margin-top: 34px; }

/* Consent tick box. */
.tb-formwrap .ff-el-form-check { margin-bottom: 6px; }
.tb-formwrap .ff-el-form-check-label,
.tb-formwrap .ff-el-form-check label {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.9rem; line-height: 1.55; font-weight: 400;
}
.tb-formwrap .ff-el-form-check input[type="checkbox"] {
  width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto;
}
.tb-formwrap .ff-el-form-check a { text-decoration: underline; text-underline-offset: 3px; }

/* Submit button. */
.tb-formwrap .ff-btn-submit,
.tb-formwrap .ff_btn_style {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--tb-font-h, sans-serif); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
  padding: 16px 32px; border-radius: 999px; border: 1px solid transparent;
  background: var(--tb-accent, #D9F53F); color: var(--tb-ink, #0C110E);
  box-shadow: none; transition: background-color 0.2s ease, transform 0.15s ease;
}
.tb-formwrap .ff-btn-submit:hover { background: var(--tb-accent-dim, #B9D22F); color: var(--tb-ink, #0C110E); }
.tb-formwrap .ff-btn-submit:active { transform: translateY(1px); }

/* Messages. */
.tb-formwrap .error-text, .tb-formwrap .text-danger, .tb-formwrap .ff-el-is-error .error {
  color: #B3261E; font-size: 0.85rem; margin-top: 6px;
}
.tb-dark .tb-formwrap .error-text, .tb-dark .tb-formwrap .text-danger { color: #FF9A90; }
.tb-formwrap .ff-message-success {
  border-left: 3px solid var(--tb-accent, #D9F53F); background: rgba(217, 245, 63, 0.12);
  padding: 26px 28px; border-radius: 0 var(--tb-r-sm, 4px) var(--tb-r-sm, 4px) 0; color: inherit;
}
.tb-formwrap .ff-message-success h3 { margin-top: 0; font-size: 1.3rem; }

/* Two columns on wider screens, one column on phones. */
@media (min-width: 783px) {
  .tb-formwrap .frm-fluent-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
  .tb-formwrap .frm-fluent-form > .ff-el-group { margin-bottom: 20px; }
  .tb-formwrap .frm-fluent-form > .ff-el-group:has(.tb-ff-legend),
  .tb-formwrap .frm-fluent-form > .ff-el-group:has(textarea),
  .tb-formwrap .frm-fluent-form > .ff-el-group:has(.ff-el-form-check),
  .tb-formwrap .frm-fluent-form > .ff_submit_btn_wrapper,
  .tb-formwrap .frm-fluent-form > .ff-message-success,
  .tb-formwrap .frm-fluent-form > .ff-custom_html { grid-column: 1 / -1; }
}

/* ==========================================================================
   Academy login page (front end)
   ========================================================================== */

.tb-loginbox, .tb-loggedin { max-width: 420px; }

.tb-loginbox #tb-loginform p { margin: 0 0 18px; max-width: none; }
.tb-loginbox label {
  display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 7px;
}
.tb-loginbox input[type="text"],
.tb-loginbox input[type="password"] {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 0.98rem;
  border: 1px solid rgba(12, 17, 14, 0.2); border-radius: var(--tb-r-sm, 4px);
  background: #fff; color: var(--tb-ink, #0C110E);
}
.tb-loginbox input[type="text"]:focus,
.tb-loginbox input[type="password"]:focus {
  outline: 2px solid var(--tb-accent, #D9F53F); outline-offset: 1px; border-color: transparent;
}
.tb-loginbox .login-remember label {
  display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 0.9rem; margin: 0;
}
.tb-loginbox .login-remember input { width: 18px; height: 18px; }
.tb-loginbox .login-submit input[type="submit"],
.tb-loginbox #wp-submit {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--tb-font-h, sans-serif); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
  padding: 16px 34px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  background: var(--tb-accent, #D9F53F); color: var(--tb-ink, #0C110E);
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.tb-loginbox #wp-submit:hover { background: var(--tb-accent-dim, #B9D22F); }
.tb-loginbox #wp-submit:active { transform: translateY(1px); }

.tb-login-links { margin: 6px 0 0; font-size: 0.9rem; }
.tb-login-links a { text-decoration: underline; text-underline-offset: 3px; }
.tb-login-guardnote {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--tb-line-ink, rgba(12,17,14,.12));
  font-size: 0.84rem; color: var(--tb-muted-ink, #5A6B5E);
}

.tb-loggedin-hi {
  font-family: var(--tb-font-h, sans-serif); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--tb-muted-ink, #5A6B5E);
  margin-bottom: 10px;
}
.tb-loggedin h3 { margin: 0 0 10px; font-size: 1.4rem; text-transform: uppercase; }
.tb-loggedin-new {
  border-left: 3px solid var(--tb-accent, #D9F53F);
  background: rgba(217, 245, 63, 0.14);
  padding: 12px 16px; margin-bottom: 20px; font-weight: 600;
}
.tb-loggedin .tb-btn-row { margin-bottom: 20px; }
.tb-loggedin-out { font-size: 0.9rem; }
.tb-loggedin-out a { text-decoration: underline; text-underline-offset: 3px; }

/* A discreet staff link in the footer. */
.tb-footer-login {
  font-size: 0.8rem;
  color: var(--tb-muted);
  opacity: 0.75;
}
.tb-footer-login:hover { opacity: 1; color: var(--tb-accent); }

/* An image slot that now holds a real photograph loses its placeholder dressing. */
.tb-ph-slot.has-photo {
  border: 0;
  background-image: none;
  background-size: cover;
  background-position: center center;
}
