/* ============================================================
   Spright Content Blocks & Blog Layout — Extended CSS
   Loaded by spright-mcp-bridge plugin on single blog/case_studies
   ============================================================ */


/* ── 1. Styled Tables ──────────────────────────────────────── */

/* Outer wrapper — rounded corners + mobile scroll */
.wp-wyswig .wp-block-table,
.resources-content__right .wp-wyswig .wp-block-table,
.blog-body__content .wp-block-table {
  overflow: visible !important;
  max-height: none !important;
  margin-bottom: 2rem;
}

.wp-wyswig .wp-block-table > table,
.wp-wyswig figure.wp-block-table {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 0.0625rem solid #e6e6e6;
}

/* Mobile: horizontal scroll */
@media (max-width: 767px) {
  .wp-wyswig .wp-block-table,
  .wp-wyswig figure.wp-block-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 1.25rem;
  }
}

.wp-wyswig .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  overflow: visible !important;
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 150%;
  border: none;
}

/* Header row */
.wp-wyswig .wp-block-table table thead tr th {
  background: #0a332b;
  color: #fff;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.875rem 1.25rem;
  text-align: left;
  letter-spacing: -0.01em;
  border: none;
}

.wp-wyswig .wp-block-table table thead tr th:first-child { border-radius: 1.1875rem 0 0 0; }
.wp-wyswig .wp-block-table table thead tr th:last-child  { border-radius: 0 1.1875rem 0 0; }

/* Body rows */
.wp-wyswig .wp-block-table table tbody tr td {
  padding: 0.875rem 1.25rem;
  border-bottom: 0.0625rem solid #e6e6e6;
  border-left: none;
  border-right: none;
  vertical-align: top;
  color: #000;
  font-size: 0.9375rem;
  line-height: 155%;
}

.wp-wyswig .wp-block-table table tbody tr:nth-child(even) td,
.wp-wyswig .wp-block-table.is-style-stripes table tbody tr:nth-child(even) td {
  background: #fafafa;
}

.wp-wyswig .wp-block-table table tbody tr:nth-child(odd) td,
.wp-wyswig .wp-block-table.is-style-stripes table tbody tr:nth-child(odd) td {
  background: #fff;
}

.wp-wyswig .wp-block-table table tbody tr:last-child td {
  border-bottom: none;
}

.wp-wyswig .wp-block-table table tbody tr td strong {
  font-weight: 500;
  color: #000;
}

.wp-wyswig .wp-block-table figcaption,
.wp-wyswig .wp-block-table .wp-element-caption {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.8125rem;
  color: #757575;
  text-align: center;
  margin-top: 0.75rem;
  line-height: 160%;
}

.resources-content__right .wp-wyswig figure.wp-block-table {
  overflow: visible !important;
  max-height: none !important;
}
.resources-content__right .wp-wyswig .wp-block-table table {
  overflow: visible !important;
  width: 100% !important;
}


/* ── 2. Callout Box ────────────────────────────────────────── */

.resources-callout {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1.5rem;
  border: 0.0625rem solid #e6e6e6;
  background: #f8f8f8;
  margin-bottom: 1.75rem;
}

.resources-callout[data-type="insight"] { background: #eafde7; border-color: #1c7060; }
.resources-callout[data-type="warning"]  { background: #fff9ec; border-color: #e6a817; }
.resources-callout[data-type="tip"]      { background: #f0f8ff; border-color: #3b82f6; }
.resources-callout[data-type="note"]     { background: #f8f8f8; border-color: #e6e6e6; }

.resources-callout__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 170%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1c7060;
}

.resources-callout[data-type="warning"]  .resources-callout__label { color: #b97900; }
.resources-callout[data-type="tip"]      .resources-callout__label { color: #3b82f6; }
.resources-callout[data-type="note"]     .resources-callout__label { color: #515151; }

.resources-callout__text {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 160%;
  color: #000;
}

.resources-callout__text p { margin: 0 0 0.5em; }
.resources-callout__text p:last-child { margin-bottom: 0; }


/* ── 3. Comparison Card ────────────────────────────────────── */

.resources-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 0.0625rem solid #e6e6e6;
  margin-bottom: 1.75rem;
}

@media (max-width: 640px) {
  .resources-comparison { grid-template-columns: 1fr; }
}

.resources-comparison__col {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.5rem;
}

.resources-comparison__col--before {
  background: #f8f8f8;
  border-right: 0.0625rem solid #e6e6e6;
}

@media (max-width: 640px) {
  .resources-comparison__col--before {
    border-right: none;
    border-bottom: 0.0625rem solid #e6e6e6;
  }
}

.resources-comparison__col--after {
  background: #0a332b;
}

.resources-comparison__header {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 0.0625rem solid rgba(0,0,0,0.1);
  color: #515151;
}

.resources-comparison__col--after .resources-comparison__header {
  border-bottom-color: rgba(255,255,255,0.15);
  color: #01db60;
}

.resources-comparison__items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resources-comparison__item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 150%;
  color: #3c3c3c;
}

.resources-comparison__col--before .resources-comparison__item::before {
  content: '×';
  font-size: 1.125rem;
  line-height: 1.35;
  color: #757575;
  flex-shrink: 0;
}

.resources-comparison__col--after .resources-comparison__item {
  color: rgba(255,255,255,0.85);
}

.resources-comparison__col--after .resources-comparison__item::before {
  content: '';
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.2em;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8L6.5 11.5L13 5' stroke='%2301db60' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}


/* ── 4. Summary / Key Takeaways Block ─────────────────────── */

.resources-summary {
  background: #0a332b;
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .resources-summary { padding: 2rem; }
}

.resources-summary__label {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #01db60;
}

.resources-summary__title {
  font-family: 'Rubik', sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 130%;
  letter-spacing: -0.02em;
  color: #fff;
  margin: -0.25rem 0 0;
}

.resources-summary__items {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.resources-summary__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 155%;
  color: rgba(255,255,255,0.85);
}

.resources-summary__item::before {
  content: '';
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.225em;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 8L6.5 11.5L13 5' stroke='%2301db60' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}


/* ── 5. Inline Note / Sidebar Tip ─────────────────────────── */

.resources-note {
  border-left: 3px solid #e6e6e6;
  padding-left: 1.5rem;
  margin-bottom: 1.75rem;
}

.resources-note__label {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #757575;
  margin-bottom: 0.375rem;
}

.resources-note__text {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 160%;
  color: #515151;
}

.resources-note__text p { margin: 0 0 0.5em; }
.resources-note__text p:last-child { margin-bottom: 0; }


/* ── 6. Icon + Text List ──────────────────────────────────── */

.resources-icon-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.resources-icon-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.resources-icon-list__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1em;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.resources-icon-list[data-style="check"] .resources-icon-list__icon {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12L10 17L19 7' stroke='%2301db60' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.resources-icon-list[data-style="arrow"] .resources-icon-list__icon {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12H19M19 12L13 6M19 12L13 18' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.resources-icon-list[data-style="x"] .resources-icon-list__icon {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 6L18 18M18 6L6 18' stroke='%23d85a30' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.resources-icon-list__content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.resources-icon-list__title {
  font-family: 'Noto Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 150%;
  color: #000;
}

.resources-icon-list__text {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 160%;
  color: #515151;
}


/* ── 7. Resources Numbers — Unified Card Override ─────────── */

.wp-wyswig .resources-numbers {
  background: #f8f8f8;
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.wp-wyswig .resources-numbers .resources-numbers__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0;
  background: #fff;
  border-radius: 1.25rem;
  border: 0.0625rem solid #e6e6e6;
  overflow: hidden;
}

.wp-wyswig .resources-numbers .resources-numbers__item {
  background: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  border-right: 0.0625rem solid #e6e6e6;
  padding: 1.25rem 1.5rem;
  margin: 0;
}

.wp-wyswig .resources-numbers .resources-numbers__item:last-child {
  border-right: none;
}

@media (max-width: 480px) {
  .wp-wyswig .resources-numbers .resources-numbers__items {
    grid-template-columns: 1fr;
  }
  .wp-wyswig .resources-numbers .resources-numbers__item {
    border-right: none;
    border-bottom: 0.0625rem solid #e6e6e6;
  }
  .wp-wyswig .resources-numbers .resources-numbers__item:last-child {
    border-bottom: none;
  }
}


/* ══════════════════════════════════════════════════════════════
   8. Blog Template — Page-level overrides
   Force white background, clear the fixed header, fix
   theme defaults that assume the old template structure.
   ══════════════════════════════════════════════════════════════ */

/* Force white on everything — the theme may set dark bg on body/main */
body.single-blog #page,
body.single-blog .main,
body.type-blog #page,
body.type-blog .main {
  background: #fff !important;
}

/* Also catch it via the inline style on .main as a belt-and-suspenders */
.blog-hero,
.blog-body {
  background: #fff;
  color: #000;
}


/* ══════════════════════════════════════════════════════════════
   9. Blog Template — Compact Hero
   ══════════════════════════════════════════════════════════════ */

.blog-hero {
  /* Clear the fixed header — theme header is ~90-120px tall */
  padding: 8rem 0 2rem;
}

@media (min-width: 768px) {
  .blog-hero { padding: 9rem 0 2rem; }
}

@media (min-width: 1024px) {
  .blog-hero { padding: 10rem 0 2.5rem; }
}

.blog-hero__content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .blog-hero__content {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }
}

.blog-hero__text {
  flex: 1 1 55%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* Override the theme's .h2 text-align: center */
  text-align: left;
}

.blog-hero__title {
  margin: 0.25rem 0 0;
  text-align: left !important;
  color: #000 !important;
}

.blog-hero__meta {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #757575;
  line-height: 170%;
}

/* Category pill — override theme centering */
.blog-hero .hero-article__category {
  margin: 0;
  text-align: left;
  display: inline-block;
  align-self: flex-start;
}

.blog-hero__img {
  flex: 0 0 40%;
  max-width: 25rem;
  border-radius: 1.5rem;
  overflow: hidden;
}

@media (max-width: 767px) {
  .blog-hero__img {
    max-width: 100%;
    border-radius: 1.25rem;
  }
}

.blog-hero__img img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}


/* ══════════════════════════════════════════════════════════════
   10. Blog Template — Content Body (no TOC sidebar)
   ══════════════════════════════════════════════════════════════ */

.blog-body {
  padding: 2rem 0 5rem;
}

@media (min-width: 1024px) {
  .blog-body { padding: 2.5rem 0 7.5rem; }
}

.blog-body__content {
  max-width: 52rem;
  margin: 0 auto;
}

/* Paragraph spacing — theme defaults collapse paragraph margins */
.blog-body__content.wp-wyswig > p {
  margin-bottom: 1.75em;
}
.blog-body__content.wp-wyswig > p:last-child {
  margin-bottom: 0;
}

/* Headings in body content should be left-aligned */
.blog-body__content h2,
.blog-body__content h3,
.blog-body__content .h2,
.blog-body__content .h3 {
  text-align: left !important;
  color: #000 !important;
}

/* Share bar */
.blog-body__content .resources-content__share {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 0.0625rem solid #e6e6e6;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-body__content .resources-content__share-text {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000;
}

.blog-body__content .resources-content__share-links {
  display: flex;
  gap: 0.75rem;
}

.blog-body__content .resources-content__share-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.blog-body__content .resources-content__share-links a:hover {
  opacity: 0.5;
}
