/* Rich text system for Airtable/Webflow-authored blog post HTML.
   Goal: preserve incoming semantic structure while rendering it in the new
   Golfer Journeys editorial style rather than Webflow's default look. */

.bp-content {
  color: var(--ink-70);
}

.bp-content > p:first-of-type {
  font-size: 18px;
  line-height: 1.9;
  color: var(--ink-80);
}

.bp-content > h2:first-child,
.bp-content > h3:first-child {
  margin-top: 0 !important;
}

.bp-content.w-richtext > :not(div):first-child,
.bp-content.w-richtext > div:first-child > :first-child,
.bp-content > :first-child {
  margin-top: 0 !important;
}

.bp-content.w-richtext > :last-child,
.bp-content.w-richtext ol li:last-child,
.bp-content.w-richtext ul li:last-child,
.bp-content > :last-child {
  margin-bottom: 0 !important;
}

.bp-content h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.024em;
  margin: 60px 0 16px;
}

.bp-content h3 {
  font-family: var(--serif);
  font-size: clamp(1.24rem, 2.3vw, 1.52rem);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: -0.018em;
  margin: 36px 0 12px;
}

.bp-content h4,
.bp-content h5,
.bp-content h6 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin: 30px 0 10px;
}

.bp-content p,
.bp-content li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.92;
  color: var(--ink-70);
}

.bp-content p {
  margin: 0 0 18px;
}

.bp-content p + figure,
.bp-content ul + figure,
.bp-content ol + figure,
.bp-content figure + p {
  margin-top: 30px;
}

.bp-content strong {
  color: var(--ink);
  font-weight: 600;
}

.bp-content em {
  font-style: italic;
  color: var(--ink-80);
}

.bp-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-border);
  transition: color 0.2s, border-color 0.2s;
}

.bp-content a:hover {
  color: var(--ink);
  border-color: var(--ink-40);
}

.bp-content ul,
.bp-content ol {
  margin: 0 0 22px 0;
  padding-left: 0;
}

.bp-content ul {
  list-style: none;
}

.bp-content ul li,
.bp-content ol li {
  position: relative;
  margin-bottom: 12px;
}

.bp-content ul li {
  padding-left: 22px;
}

.bp-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

.bp-content ol {
  list-style: none;
  counter-reset: bp-ol;
}

.bp-content ol li {
  counter-increment: bp-ol;
  padding-left: 34px;
}

.bp-content ol li::before {
  content: counter(bp-ol);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--ink-10), transparent);
  margin: 38px 0;
}

.bp-content blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, rgba(184,137,42,0.10), rgba(184,137,42,0.03));
  border-radius: 0 16px 16px 0;
}

.bp-content blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-80);
}

.bp-content figure {
  margin: 38px 0;
}

.bp-content figure > div {
  margin: 0;
}

.bp-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--ink-10), 0 18px 44px rgba(17,18,16,0.08);
}

.bp-content figure.w-richtext-figure-type-image,
.bp-content figure.bp-figure {
  display: grid;
  gap: 10px;
}

.bp-content figure.w-richtext-align-center,
.bp-content figure.bp-figure-center {
  justify-items: center;
}

.bp-content figure.w-richtext-align-fullwidth,
.bp-content figure.bp-figure-full {
  width: min(calc(100vw - (var(--pad) * 2)), 1040px);
  margin-left: 50%;
  transform: translateX(-50%);
}

.bp-content figure.w-richtext-align-fullwidth img,
.bp-content figure.bp-figure-full img {
  width: 100%;
}

.bp-content figure[data-rt-max-width="1600px"] img,
.bp-content figure[style*="max-width:1600px"] img,
.bp-content figure[data-img-max="1600px"] img {
  max-width: 1040px;
}

.bp-content figure[data-rt-max-width="800px"] img,
.bp-content figure[style*="max-width:800px"] img,
.bp-content figure[data-img-max="800px"] img {
  max-width: 800px;
}

.bp-content figure[data-rt-max-width="612px"] img,
.bp-content figure[style*="max-width:612px"] img,
.bp-content figure[data-img-max="612px"] img {
  max-width: 612px;
}

.bp-content figure[data-rt-max-width="600px"] img,
.bp-content figure[style*="max-width:600px"] img,
.bp-content figure[data-img-max="600px"] img {
  max-width: 600px;
}

.bp-content figcaption {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-40);
  font-style: italic;
}

.bp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--ink-10);
}

.bp-content th,
.bp-content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ink-10);
  text-align: left;
}

.bp-content th {
  background: var(--surface-1);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bp-content pre,
.bp-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.bp-content pre {
  background: var(--ink);
  color: rgba(255,255,255,0.84);
  padding: 18px 20px;
  border-radius: 18px;
  overflow-x: auto;
  margin: 28px 0;
}

.bp-content code {
  font-size: 0.92em;
}

.bp-content :not(pre) > code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  padding: 0;
}

.bp-content sub:empty {
  display: none;
}

.bp-content sub {
  font-size: 0.7em;
  line-height: 0;
  vertical-align: baseline;
  position: relative;
  bottom: -0.15em;
}

@media (max-width: 600px) {
  .bp-content p,
  .bp-content li {
    font-size: 15px;
    line-height: 1.85;
  }

  .bp-content blockquote p {
    font-size: 1.14rem;
  }

  .bp-content figure {
    margin: 26px 0;
  }
}
