/* NDIO Editorial Blog — matches ndio_co_za_editorial_ecosystem.html */

.blog-editorial {
  --be-green: #47ba2c;
  --be-green-hover: #3ba223;
  --be-green-light: #f0fdf2;
  --be-orange: #fa7103;
  --be-orange-hover: #e06300;
  --be-dark: #111827;
  --be-charcoal: #1f2937;
  --be-muted: #6b7280;
  --be-surface: #f8fafc;
  --be-border: #e2e8f0;
  --be-heading: "Outfit", system-ui, sans-serif;
  --be-body: "Inter", system-ui, sans-serif;
  background: var(--be-surface);
  font-family: var(--be-body);
}

.blog-editorial .ndio-site main {
  padding: 0;
}

.be-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #e5e7eb;
  z-index: 120;
}

.be-progress__bar {
  height: 100%;
  width: 0;
  background: var(--be-green);
  transition: width 0.1s ease-out;
}

/* Hero */
.be-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 3rem 0 5rem;
  background: linear-gradient(180deg, #111827 0%, #0f172a 45%, #111827 100%);
}

.be-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(#47ba2c 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.be-hero__inner {
  position: relative;
  z-index: 1;
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .be-hero__inner {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
  }
}

.be-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgb(71 186 44 / 0.15);
  border: 1px solid rgb(71 186 44 / 0.3);
  color: var(--be-green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.be-hero__badge svg {
  color: var(--be-orange);
  width: 1rem;
  height: 1rem;
}

.be-hero h1 {
  margin: 1rem 0 0;
  font-family: var(--be-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.be-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--be-green), #86efac, var(--be-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.be-hero__lede {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.65;
}

.be-hero__search {
  margin-top: 1.5rem;
  max-width: 32rem;
}

.be-hero__search form {
  position: relative;
  display: flex;
  align-items: center;
}

.be-hero__search input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: none;
  border-radius: 1rem;
  font-size: 0.95rem;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.25);
}

.be-hero__search svg {
  position: absolute;
  left: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
}

.be-hero__search button {
  position: absolute;
  right: 0.4rem;
  padding: 0.65rem 1.1rem;
  border: none;
  border-radius: 0.75rem;
  background: var(--be-green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.be-hero__search button:hover {
  background: var(--be-green-hover);
}

.be-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.be-hero__visual {
  position: relative;
  max-width: 28rem;
  margin: 0 auto;
  width: 100%;
}

.be-hero__visual-glow {
  position: absolute;
  inset: -4px;
  background: linear-gradient(90deg, var(--be-green), var(--be-orange));
  border-radius: 1.5rem;
  filter: blur(12px);
  opacity: 0.35;
}

.be-hero__visual-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #374151;
  background: #1f2937;
  box-shadow: 0 24px 48px rgb(0 0 0 / 0.35);
}

.be-hero__visual-card img {
  display: block;
  width: 100%;
  height: auto;
}

.be-hero__visual-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgb(17 24 39 / 0.92);
  border-top: 1px solid #374151;
  font-size: 0.72rem;
}

.be-hero__visual-foot strong {
  display: block;
  color: #fff;
  font-size: 0.78rem;
}

.be-hero__visual-foot a {
  color: var(--be-green);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* Category bar */
.be-categories {
  position: sticky;
  top: var(--ndio-header-height, 72px);
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--be-border);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
}

.be-categories__inner {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  overflow-x: auto;
}

.be-categories__label {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
}

.be-pill {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  border: none;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.be-pill:hover {
  background: #e5e7eb;
  text-decoration: none;
}

.be-pill.is-active {
  background: var(--be-green);
  color: #fff;
  box-shadow: 0 4px 12px rgb(71 186 44 / 0.25);
}

/* Main wrap */
.be-main {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.be-main > * + * {
  margin-top: 4rem;
}

/* Featured spotlight */
.be-featured {
  background: #fff;
  border: 1px solid var(--be-border);
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: 0 4px 20px rgb(17 24 39 / 0.04);
}

.be-featured__kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--be-orange);
}

.be-featured__kicker span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--be-orange);
}

.be-featured__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .be-featured__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.be-featured__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--be-muted);
}

.be-tag {
  padding: 0.25rem 0.65rem;
  border-radius: 0.4rem;
  background: var(--be-green-light);
  color: var(--be-green);
  font-weight: 700;
}

.be-featured h2 {
  margin: 0.75rem 0 0;
  font-family: var(--be-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.be-featured h2 a {
  color: var(--be-dark);
  text-decoration: none;
}

.be-featured h2 a:hover {
  color: var(--be-green);
}

.be-featured__excerpt {
  margin: 0.75rem 0 0;
  color: #4b5563;
  line-height: 1.65;
}

.be-featured__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f3f4f6;
}

.be-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.be-author__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--be-green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.be-author__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--be-dark);
}

.be-author__role {
  font-size: 0.68rem;
  color: var(--be-muted);
}

.be-featured__image {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--be-border);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.08);
}

.be-featured__image img {
  display: block;
  width: 100%;
  height: 18rem;
  object-fit: cover;
  transition: transform 0.5s;
}

.be-featured__image:hover img {
  transform: scale(1.03);
}

.be-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.be-btn--dark {
  background: var(--be-dark);
  color: #fff;
}

.be-btn--dark:hover {
  background: #1f2937;
  color: #fff;
  text-decoration: none;
}

.be-btn--green {
  background: var(--be-green);
  color: #fff;
}

.be-btn--green:hover {
  background: var(--be-green-hover);
  color: #fff;
  text-decoration: none;
}

/* Section head */
.be-section-head h2 {
  margin: 0;
  font-family: var(--be-heading);
  font-size: 1.65rem;
  color: var(--be-dark);
}

.be-section-head p {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--be-muted);
}

.be-section-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--be-border);
  margin-bottom: 1.5rem;
}

/* Article grid */
.be-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .be-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .be-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.be-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--be-border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.03);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s, transform 0.25s;
}

.be-card:hover {
  box-shadow: 0 16px 40px rgb(17 24 39 / 0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.be-card__media {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.be-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.be-card:hover .be-card__media img {
  transform: scale(1.05);
}

.be-card__media .be-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(4px);
}

.be-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.35rem;
  gap: 0.5rem;
}

.be-card__meta {
  font-size: 0.68rem;
  color: #9ca3af;
}

.be-card h3 {
  margin: 0;
  font-family: var(--be-heading);
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--be-dark);
}

.be-card:hover h3 {
  color: var(--be-green);
}

.be-card__excerpt {
  margin: 0;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.be-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.68rem;
  color: var(--be-muted);
}

.be-card__read {
  font-weight: 800;
  color: var(--be-green);
}

/* CTA banner */
.be-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3rem);
  border-radius: 1.5rem;
  background: linear-gradient(90deg, var(--be-dark), #1f2937, var(--be-dark));
  color: #fff;
  border: 1px solid #374151;
}

.be-cta__badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--be-orange);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.be-cta h3 {
  margin: 0.75rem 0 0;
  font-family: var(--be-heading);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

.be-cta p {
  margin: 0.5rem 0 0;
  max-width: 32rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.be-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.be-btn--ghost {
  background: #374151;
  color: #e5e7eb;
  border: 1px solid #4b5563;
}

.be-btn--ghost:hover {
  background: #4b5563;
  color: #fff;
  text-decoration: none;
}

@media (min-width: 768px) {
  .be-cta__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
    gap: 2rem;
  }

  .be-cta__actions {
    flex-direction: column;
    margin-top: 0;
  }

  .be-btn--block {
    width: 100%;
    justify-content: center;
  }
}

/* FAQ */
.be-faq {
  background: #fff;
  border: 1px solid var(--be-border);
  border-radius: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.be-faq details {
  border: 1px solid var(--be-border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.be-faq details + details {
  margin-top: 0.75rem;
}

.be-faq summary {
  font-weight: 700;
  color: var(--be-dark);
  cursor: pointer;
  list-style: none;
}

.be-faq summary::-webkit-details-marker {
  display: none;
}

.be-faq details p {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.65;
}

/* Newsletter */
.be-newsletter {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  background: var(--be-green-light);
  border: 1px solid rgb(71 186 44 / 0.2);
  border-radius: 1.5rem;
}

.be-newsletter__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--be-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.be-newsletter h3 {
  margin: 0;
  font-family: var(--be-heading);
  font-size: 1.5rem;
}

.be-newsletter p {
  margin: 0.5rem auto 0;
  max-width: 24rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.be-newsletter form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 24rem;
  margin: 1rem auto 0;
}

@media (min-width: 640px) {
  .be-newsletter form {
    flex-direction: row;
  }
}

.be-newsletter input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 0.85rem;
}

.be-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #fff;
  border: 1px solid var(--be-border);
  border-radius: 1rem;
}

/* Article page */
.be-article {
  background: #fff;
  padding: 2rem 0 3rem;
}

.be-article__crumb {
  width: min(56rem, calc(100% - 2rem));
  margin: 0 auto 1.25rem;
  font-size: 0.72rem;
  color: var(--be-muted);
}

.be-article__crumb a {
  color: var(--be-muted);
  text-decoration: none;
}

.be-article__crumb a:hover {
  color: var(--be-green);
}

.be-article__header {
  width: min(56rem, calc(100% - 2rem));
  margin: 0 auto;
}

.be-article__header h1 {
  margin: 0.75rem 0 0;
  font-family: var(--be-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.12;
  color: var(--be-dark);
}

.be-article__excerpt {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  color: #4b5563;
  line-height: 1.65;
}

.be-article__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-block: 1px solid #f3f4f6;
}

.be-article__hero {
  width: min(56rem, calc(100% - 2rem));
  margin: 2rem auto 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--be-border);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.06);
}

.be-article__hero img {
  display: block;
  width: 100%;
  max-height: 30rem;
  object-fit: cover;
}

.be-article__layout {
  width: min(72rem, calc(100% - 2rem));
  margin: 2.5rem auto 0;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .be-article__layout {
    grid-template-columns: 1fr 320px;
  }
}

.be-prose h2 {
  font-family: var(--be-heading);
  font-weight: 700;
  font-size: 1.65rem;
  color: var(--be-dark);
  margin: 2rem 0 1rem;
}

.be-prose h3 {
  font-family: var(--be-heading);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--be-charcoal);
  margin: 1.5rem 0 0.75rem;
}

.be-prose p {
  color: #374151;
  line-height: 1.8;
  margin-bottom: 1.15rem;
  font-size: 1.02rem;
}

.be-prose ul,
.be-prose ol {
  margin-bottom: 1.15rem;
  padding-left: 1.5rem;
}

.be-prose li {
  color: #374151;
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

.be-prose blockquote {
  border-left: 4px solid var(--be-green);
  background: var(--be-surface);
  padding: 1rem 1.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  margin: 1.5rem 0;
}

.be-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.be-callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--be-green-light);
  border-left: 4px solid var(--be-green);
  border-radius: 0 1rem 1rem 0;
}

.be-callout h4 {
  margin: 0 0 0.5rem;
  font-family: var(--be-heading);
  font-size: 1.1rem;
}

.be-callout p {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.be-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .be-sidebar {
    display: block;
  }

  .be-sidebar__sticky {
    position: sticky;
    top: calc(var(--ndio-header-height, 72px) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
}

.be-toc {
  padding: 1.25rem;
  background: var(--be-surface);
  border: 1px solid var(--be-border);
  border-radius: 1rem;
}

.be-toc h3 {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
}

.be-toc nav {
  border-left: 1px solid var(--be-border);
  padding-left: 0.75rem;
}

.be-toc a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.75rem;
  color: #4b5563;
  text-decoration: none;
}

.be-toc a:hover {
  color: var(--be-green);
}

.be-sidebar-card {
  padding: 1.25rem;
  border: 1px solid var(--be-border);
  border-radius: 1rem;
  background: #fff;
}

.be-sidebar-card--dark {
  background: linear-gradient(135deg, var(--be-dark), #1f2937);
  border-color: #374151;
  color: #fff;
}

.be-sidebar-card--dark p {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.be-sidebar-card--dark .be-cta__badge {
  font-size: 0.6rem;
}

.be-related {
  width: min(56rem, calc(100% - 2rem));
  margin: 3rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid var(--be-border);
}

.be-related__grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .be-related__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.be-related-card {
  padding: 1rem;
  background: var(--be-surface);
  border: 1px solid var(--be-border);
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}

.be-related-card:hover {
  border-color: var(--be-green);
  text-decoration: none;
  color: inherit;
}

.be-related-card h4 {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--be-dark);
}

.be-related-card:hover h4 {
  color: var(--be-green);
}

.be-mobile-toc {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--be-surface);
  border: 1px solid var(--be-border);
  border-radius: 0.75rem;
}

@media (min-width: 1024px) {
  .be-mobile-toc {
    display: none;
  }
}

.be-preview-banner {
  width: min(56rem, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: 0.65rem 1rem;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.be-pagination {
  margin-top: 2rem;
}
