/* =============================================================
   BHPFA DESIGN SYSTEM — Shared Base Layer

   Paste into: Avada > Theme Options > Custom CSS

   This is the REUSABLE foundation for all custom BHPFA pages.
   Page-specific styles go in separate files and are appended
   below this in the Custom CSS field.

   Naming convention: .bds-* (BHPFA Design System)
   All rules scoped under .bds-page to prevent site-wide leaks.
   ============================================================= */

/* ===== FONTS ===== */
/* Fonts ship via tokens.css now (Roboto Slab + Work Sans). Material Symbols
   is deliberately NOT loaded here: the full variable icon font is ~3.5MB and
   renders raw ligature names ("park", "explore") as visible text while it
   downloads. functions.php (bhpfa_fable_icon_subset_url) scans the page
   content for the icon names actually used and enqueues a tiny per-page
   subset with font-display:block instead. */

/* ===== DESIGN TOKENS ===== */
.bds-page {
  --bds-primary: #007239;
  --bds-primary-deep: #005a2d;
  --bds-primary-container: #006838;
  --bds-sage: #9ca68b;
  --bds-sage-muted: #b8c2ad;
  --bds-cream: #f1f1dc;
  --bds-surface: #fbf9f8;
  --bds-surface-low: #f6f3f2;
  --bds-surface-mid: #f0eded;
  --bds-surface-high: #e4e2e1;
  --bds-on-surface: #1b1c1c;
  --bds-on-surface-muted: #4a5043;
  --bds-on-surface-light: #6f7a70;
  --bds-white: #ffffff;
  --bds-terracotta: #8a4a2a;
  --bds-outline-ghost: rgba(156, 166, 139, 0.2);
  --bds-shadow: 0px 20px 40px rgba(27, 28, 28, 0.06);
  --bds-radius-lg: 1.5rem;
  --bds-radius-xl: 2rem;

  font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif);
  color: var(--bds-on-surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/* ===== BASE ELEMENTS ===== */
.bds-page a { color: var(--bds-primary); text-decoration: none !important; }
.bds-page a:visited { color: var(--bds-primary); }
.bds-page a:hover { text-decoration: underline !important; }
.bds-page img { max-width: 100%; display: block; }

.bds-page .material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ===== TYPOGRAPHY ===== */
.bds-page h1, .bds-page h2, .bds-page h3, .bds-page h4 {
  font-family: var(--font-display, "Roboto Slab", Rockwell, "Courier New", serif);
  color: var(--bds-primary);
  line-height: 1.15;
}
.bds-page h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; letter-spacing: -0.03em; }
.bds-page h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; margin-bottom: 1rem; }
.bds-page h3 { font-size: 1.6rem; font-weight: 600; }
.bds-page h4 { font-size: 1.25rem; font-weight: 600; }

.bds-label {
  font-family: var(--font-label, "Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--bds-sage);
}
.bds-serif-body {
  font-family: var(--font-display, "Roboto Slab", Rockwell, "Courier New", serif);
  font-size: 1.15rem; line-height: 1.75;
  color: var(--bds-on-surface-muted);
  max-width: 100%;
}

/* ===== LAYOUT ===== */
.bds-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
.bds-section { padding: 5rem 0; }
.bds-section-alt { background: var(--bds-surface-low); }
.bds-section-cream { background: var(--bds-cream); }

/* ===== BUTTONS ===== */
.bds-btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.85em 2em; border-radius: 0.75rem;
  font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif); font-weight: 600; font-size: 0.95rem;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none !important;
}
.bds-btn-primary,
.bds-page a.bds-btn-primary,
.bds-page a.bds-btn-primary:visited {
  background: linear-gradient(180deg, var(--bds-primary) 0%, var(--bds-primary-deep) 100%);
  color: var(--bds-white) !important;
  box-shadow: 0 4px 14px rgba(0, 114, 57, 0.25);
  text-decoration: none !important;
}
.bds-btn-primary:hover,
.bds-page a.bds-btn-primary:hover {
  background: var(--bds-primary-container);
  transform: translateY(-1px);
  color: var(--bds-white) !important;
}
.bds-btn-outline,
.bds-page a.bds-btn-outline {
  background: transparent; color: var(--bds-primary) !important;
  border: 2px solid var(--bds-primary); text-decoration: none !important;
}
.bds-btn-outline:hover,
.bds-page a.bds-btn-outline:hover {
  background: var(--bds-primary); color: var(--bds-white) !important;
}
.bds-btn-white,
.bds-page a.bds-btn-white,
.bds-page a.bds-btn-white:visited {
  background: var(--bds-white); color: var(--bds-primary) !important;
  font-weight: 700; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  text-decoration: none !important;
}
.bds-btn-white:hover,
.bds-page a.bds-btn-white:hover {
  background: var(--bds-surface-low); color: var(--bds-primary) !important;
}
.bds-btn-glass,
.bds-page a.bds-btn-glass {
  background: rgba(255,255,255,0.5); backdrop-filter: blur(8px);
  color: var(--bds-on-surface) !important;
  border: 1px solid var(--bds-outline-ghost); text-decoration: none !important;
}
.bds-btn-glass:hover,
.bds-page a.bds-btn-glass:hover { background: rgba(255,255,255,0.8); }
/* Never underline buttons on hover */
.bds-page a.bds-btn:hover { text-decoration: none !important; }

/* ===== CARDS ===== */
.bds-card {
  background: var(--bds-white); border-radius: var(--bds-radius-xl);
  overflow: hidden; box-shadow: var(--bds-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.bds-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(27,28,28,0.1); }
.bds-card-landscape { display: grid; grid-template-columns: 1fr 1.2fr; }
.bds-card-img { position: relative; height: 100%; min-height: 320px; overflow: hidden; }
.bds-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.bds-card:hover .bds-card-img img { transform: scale(1.05); }
.bds-card-badge {
  position: absolute; top: 1rem; left: 1rem;
  padding: 0.3em 0.9em; background: rgba(0, 114, 57, 0.9);
  color: white; border-radius: 2rem;
  font-family: var(--font-label, "Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif); font-size: 0.65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; backdrop-filter: blur(4px);
}
.bds-card-body { padding: 2rem 2.2rem 2.2rem; }
.bds-card-body p { color: var(--bds-on-surface-muted); margin-bottom: 1rem; line-height: 1.7; }
.bds-card-body ul { margin: 0.5rem 0 1.2rem 1.3rem; color: var(--bds-on-surface-muted); }
.bds-card-body li { margin-bottom: 0.35em; }

/* ===== LINK CARDS (for cross-linking sections) ===== */
.bds-link-card,
.bds-page a.bds-link-card,
.bds-page a.bds-link-card:visited {
  padding: 2rem; background: var(--bds-white); border-radius: var(--bds-radius-lg);
  box-shadow: var(--bds-shadow); transition: transform 0.2s;
  text-decoration: none !important; color: var(--bds-on-surface) !important; display: block;
}
.bds-link-card:hover,
.bds-page a.bds-link-card:hover { transform: translateY(-3px); text-decoration: none !important; }
.bds-link-card h4, .bds-link-card p, .bds-link-card span { text-decoration: none !important; }

/* ===== FAQ ACCORDION ===== */
.bds-faq { max-width: 800px; margin: 2rem auto 0; }
.bds-faq details {
  background: var(--bds-white); border-radius: var(--bds-radius-lg);
  margin-bottom: 0.5rem; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  border: 1px solid rgba(156, 166, 139, 0.15);
}
.bds-faq summary {
  padding: 1.3rem 1.8rem; font-family: var(--font-display, "Roboto Slab", Rockwell, "Courier New", serif);
  font-size: 1.25rem; font-weight: 600; color: var(--bds-primary);
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.15s;
}
.bds-faq summary:hover { background: var(--bds-surface-low); }
.bds-faq summary::after {
  content: '+'; font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif); font-size: 1.4rem;
  color: var(--bds-sage); font-weight: 300; transition: transform 0.2s;
}
.bds-faq details[open] summary::after { content: '\2212'; }
.bds-faq details[open] summary { background: var(--bds-surface-low); }
.bds-faq summary::-webkit-details-marker { display: none; }
.bds-faq .bds-faq-answer {
  padding: 0 1.8rem 1.5rem; color: var(--bds-on-surface-muted);
  font-size: 0.92rem; line-height: 1.75;
}

/* ===== CALLOUT BOX ===== */
.bds-callout {
  background: var(--bds-cream); border-radius: var(--bds-radius-xl);
  padding: 3rem 3.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 2rem;
}
.bds-callout h3 { margin-bottom: 0.5rem; }
.bds-callout p { color: var(--bds-on-surface-muted); max-width: 550px; margin: 0; }

/* ===== PRICING TIERS ===== */
.bds-tier {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 1.8rem; border-radius: var(--bds-radius-lg);
  background: var(--bds-surface-low); border-left: 4px solid var(--bds-sage);
}
.bds-tier-featured { background: rgba(0, 114, 57, 0.06); border-left-color: var(--bds-primary); }
.bds-tier-name { font-family: var(--font-display, "Roboto Slab", Rockwell, "Courier New", serif); font-size: 1.15rem; color: var(--bds-primary); }
.bds-tier-price { font-family: var(--font-display, "Roboto Slab", Rockwell, "Courier New", serif); font-size: 1.5rem; font-weight: 700; color: var(--bds-terracotta); }

/* ===== MEMBER BANNER ===== */
.bds-member-card {
  padding: 2rem; background: var(--bds-on-surface);
  border-radius: var(--bds-radius-lg); color: var(--bds-white);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.bds-member-card .bds-label { color: #83d99d; margin-bottom: 0.3rem; }
.bds-member-card h4 { color: var(--bds-white); margin-bottom: 0.3rem; }
.bds-member-card p { color: #999; font-size: 0.88rem; margin: 0; }

/* ===== INSTRUCTOR CARDS ===== */
.bds-instructors { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.bds-instructor {
  display: flex; gap: 1.8rem; padding: 2.5rem;
  background: var(--bds-white); border-radius: var(--bds-radius-xl);
  box-shadow: var(--bds-shadow);
}
.bds-instructor-photo {
  width: 120px; height: 120px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; background: var(--bds-surface-mid);
}
.bds-instructor-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ===== CHECKLIST ===== */
.bds-check-item { display: flex; align-items: flex-start; gap: 0.8rem; }
.bds-check-item .material-symbols-outlined {
  color: var(--bds-primary); font-size: 1.3rem; margin-top: 0.1rem;
  font-variation-settings: 'FILL' 1;
}
.bds-check-item h5 {
  font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif); font-weight: 600;
  color: var(--bds-primary); font-size: 0.92rem; margin-bottom: 0.15rem;
}
.bds-check-item p { font-size: 0.78rem; color: var(--bds-on-surface-light); margin: 0; line-height: 1.5; }

/* ===== FULL-BLEED CTA ===== */
.bds-cta-section {
  position: relative; padding: 6rem 2rem; text-align: center; overflow: hidden;
}
.bds-cta-section-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--bds-primary) 0%, var(--bds-primary-deep) 100%);
  z-index: 0;
}
.bds-cta-section-content { position: relative; z-index: 1; color: var(--bds-white); }
.bds-cta-section h2 { color: var(--bds-white); font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.bds-cta-section p { font-size: 1.15rem; opacity: 0.9; max-width: 580px; margin: 0 auto 2rem; }

/* ===== FOOTER NOTE ===== */
.bds-footer-note {
  text-align: center; padding: 2rem; font-size: 0.82rem;
  color: var(--bds-on-surface-light); background: var(--bds-surface-low);
}
.bds-footer-note a { color: var(--bds-primary); }

/* ===== WPFORMS INTEGRATION ===== */
.post-content .wpforms-container,
.entry-content .wpforms-container,
.fusion-fullwidth .wpforms-container,
body.page .wpforms-container {
  max-width: 960px;
  margin: -4rem auto 4rem;
  padding: 2rem 2.5rem;
  background: #ffffff;
  border-radius: 1.5rem;
  box-shadow: 0px 20px 40px rgba(27, 28, 28, 0.06);
}
.wpforms-container .wpforms-field-label {
  font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif); font-weight: 600; color: #1b1c1c;
}
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container select,
.wpforms-container textarea {
  border: 1px solid rgba(156, 166, 139, 0.2);
  border-radius: 0.5rem; font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif);
  padding: 0.7rem 1rem; transition: border-color 0.2s;
}
.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
  border-color: #007239; outline: none;
  box-shadow: 0 0 0 3px rgba(0, 114, 57, 0.1);
}
.wpforms-container .wpforms-submit-container button,
.wpforms-container button[type="submit"] {
  background: linear-gradient(180deg, #007239 0%, #005a2d 100%);
  color: #ffffff !important; border: none;
  padding: 0.85em 2.5em; border-radius: 0.75rem;
  font-family: var(--font-body, "Helvetica Neue", Helvetica, Arial, sans-serif); font-weight: 600; font-size: 1rem;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 114, 57, 0.25); transition: all 0.2s;
}
.wpforms-container .wpforms-submit-container button:hover,
.wpforms-container button[type="submit"]:hover {
  background: #006838; transform: translateY(-1px);
}

/* Dynamic spots counter */
.bds-page .ncw-spots-counter,
.ncw-spots-counter {
  text-align: center; font-family: var(--font-label, "Work Sans", "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: 0.85rem; font-weight: 600; color: #007239;
  background: rgba(0,114,57,0.06); padding: 0.6rem 1.2rem;
  border-radius: 0.5rem; margin-bottom: 1rem;
}

/* ===== RESPONSIVE — SHARED ===== */
@media (max-width: 900px) {
  .bds-card-landscape { grid-template-columns: 1fr; }
  .bds-card-img { min-height: 240px; }
  .bds-instructors { grid-template-columns: 1fr; }
  .bds-instructor { flex-direction: column; align-items: center; text-align: center; }
  .bds-callout { flex-direction: column; text-align: center; padding: 2rem; }
  .bds-member-card { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .bds-section { padding: 3rem 0; }
  .bds-faq summary { font-size: 1.05rem; padding: 1rem 1.2rem; }
}
