/*
Theme Name: Zama Blog
Theme URI: https://zama.co.ke/blog/
Author: Zama Web Experts
Author URI: https://zama.co.ke/
Description: Custom WordPress blog theme for Zama Web Experts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: zama-blog
*/

:root {
  --zama-deep: #082a1d;
  --zama-ink: #12201a;
  --zama-green: #137a45;
  --zama-green-2: #1f8f57;
  --zama-mint: #dff6e9;
  --zama-soft: #f4f7f3;
  --zama-line: rgba(18, 32, 26, 0.1);
  --zama-muted: #607268;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 95% 4%, rgba(31, 143, 87, 0.13), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, var(--zama-soft) 46%, #eef4ee 100%);
  color: var(--zama-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--zama-green);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

.zama-container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.zama-topbar {
  background: #0f5f3a;
  color: #fff;
  font-size: 0.86rem;
}

.zama-topbar .zama-container {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.zama-topbar span {
  color: rgba(255, 255, 255, 0.78);
}

.zama-topbar a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.zama-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--zama-line);
  box-shadow: 0 12px 26px rgba(18, 32, 26, 0.08);
}

.zama-header .zama-container {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.zama-logo {
  display: inline-flex;
  align-items: center;
}

.zama-logo img {
  width: 184px;
  height: auto;
  display: block;
}

.zama-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.zama-nav a {
  color: #1f2937;
  font-weight: 900;
  text-decoration: none;
  font-size: 0.94rem;
}

.zama-nav a:hover {
  color: var(--zama-green);
}

.zama-menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid #b9d7c5;
  border-radius: 999px;
  background: #edf8f1;
  color: #08452f;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.zama-nav .zama-cta {
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  background: #99e7c6;
  color: #06291c;
}

.zama-hero {
  background:
    linear-gradient(90deg, rgba(8, 27, 20, 0.78), rgba(8, 36, 24, 0.62)),
    linear-gradient(135deg, #082a1d 0%, #145a3a 58%, #1b8b54 100%);
  color: #fff;
  padding: clamp(1.8rem, 3.2vw, 3rem) 0;
}

.zama-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: clamp(0.9rem, 2vw, 1.5rem);
  align-items: end;
}

.zama-kicker {
  margin: 0 0 0.55rem;
  color: #aef0cc;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.zama-hero h1 {
  margin: 0;
  max-width: 760px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: 1.02;
  font-weight: 900;
}

.zama-hero p {
  max-width: 680px;
  margin: 0.75rem 0 0;
  color: rgba(241, 250, 246, 0.88);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.zama-search {
  padding: 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.zama-search form {
  display: flex;
  gap: 0.55rem;
}

.zama-search input[type="search"] {
  min-width: 0;
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  font: inherit;
}

.zama-search button,
.zama-button {
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  background: #99e7c6;
  color: #06291c;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zama-main {
  padding: clamp(1rem, 2.2vw, 1.8rem) 0;
}

.zama-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 0.9rem;
  align-items: start;
}

.zama-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.zama-card,
.zama-panel {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--zama-line);
  box-shadow: 0 12px 30px rgba(18, 32, 26, 0.065);
}

.zama-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.zama-card-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f3f2a, #1f8f57);
  overflow: hidden;
}

.zama-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zama-card-body {
  padding: 0.88rem;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.zama-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  color: var(--zama-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.zama-card h2,
.zama-entry h1,
.zama-entry h2,
.zama-panel h2 {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.zama-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.14;
}

.zama-card h2 a {
  color: var(--zama-ink);
  text-decoration: none;
}

.zama-card h2 a:hover {
  color: var(--zama-green);
}

.zama-excerpt {
  margin: 0.55rem 0 0;
  color: #4a5b52;
  line-height: 1.48;
}

.zama-read {
  margin-top: auto;
  padding-top: 0.65rem;
  font-weight: 900;
  text-decoration: none;
}

.zama-sidebar {
  display: grid;
  gap: 0.7rem;
}

.zama-panel {
  padding: 0.88rem;
}

.zama-panel h2,
.zama-panel .widget-title {
  margin: 0 0 0.7rem;
  color: var(--zama-ink);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zama-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.zama-panel li + li {
  margin-top: 0.45rem;
}

.zama-entry {
  max-width: 820px;
  margin: 0 auto;
}

.zama-entry-shell {
  padding: clamp(1rem, 3vw, 2rem);
}

.zama-entry h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.07;
  font-weight: 900;
}

.zama-content {
  color: #24362d;
  font-size: 1.06rem;
}

.zama-content h2,
.zama-content h3 {
  color: var(--zama-ink);
  margin-top: 1.6rem;
}

.zama-content p,
.zama-content ul,
.zama-content ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

.zama-content blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--zama-green);
  background: #edf7f0;
}

.sacco-conversion-box {
  margin: 0 0 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #b9dfc8;
  border-radius: 18px;
  background: linear-gradient(135deg, #edf9f2 0%, #f8fcf9 100%);
  box-shadow: 0 14px 34px rgba(8, 69, 45, 0.1);
}

.single-post.postid-800 .zama-hero {
  padding: clamp(2.4rem, 5vw, 4.5rem) 0;
}

.single-post.postid-800 .zama-hero h1 {
  max-width: 690px;
  font-size: clamp(2.6rem, 4.6vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.sacco-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.sacco-hero-subhead {
  max-width: 780px;
  margin: 1rem 0 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.sacco-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sacco-hero-call {
  border-color: rgba(255, 255, 255, 0.75);
  background: #fff;
  color: #08452f !important;
}

.zama-hero .sacco-hero-note {
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.sacco-demo-panel {
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px);
}

.zama-hero .sacco-demo-label {
  margin: 0 0 0.4rem;
  color: #aef0cc;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sacco-demo-panel h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.2;
}

.sacco-demo-panel ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sacco-demo-panel li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sacco-demo-panel li strong {
  color: #fff;
}

.sacco-demo-panel li span {
  color: rgba(255, 255, 255, 0.72);
}

.zama-hero .sacco-demo-response {
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.single-post.postid-800 .zama-main {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  background: #f7f9f6;
}

.single-post.postid-800 .zama-entry {
  max-width: 920px;
}

.single-post.postid-800 .zama-entry-shell {
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.single-post.postid-800 .zama-content {
  color: #293c32;
  font-size: 1.08rem;
  line-height: 1.72;
}

.single-post.postid-800 .zama-content > h2:first-child {
  display: none;
}

.single-post.postid-800 .zama-content h2 {
  margin-top: 2.4rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.18;
}

.single-post.postid-800 .zama-content h3 {
  margin-top: 1.8rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
}

.single-post.postid-800 #ez-toc-container {
  width: 100%;
  margin: 1.5rem 0 2.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d6e5db;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(8, 69, 45, 0.06);
}

.single-post.postid-800 #ez-toc-container .ez-toc-title {
  margin: 0;
  color: #163c29;
  font-weight: 900;
}

.single-post.postid-800 #ez-toc-container nav {
  max-height: 380px;
  margin-top: 0.85rem;
  overflow: auto;
}

.sacco-conversion-box-final {
  margin: 2rem 0 0;
  background: #083d2b;
  color: #fff;
}

.zama-content .sacco-conversion-box h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.18;
}

.zama-content .sacco-conversion-box-final h2,
.zama-content .sacco-conversion-box-final p {
  color: #fff;
}

.zama-content .sacco-conversion-eyebrow {
  margin-bottom: 0.55rem;
  color: #167847;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.zama-content .sacco-conversion-box-final .sacco-conversion-eyebrow {
  color: #9ff0bf;
}

.sacco-conversion-benefits {
  display: flex;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.sacco-conversion-benefits li::before {
  content: "\2713";
  margin-right: 0.45rem;
  color: #16884e;
  font-weight: 900;
}

.sacco-conversion-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sacco-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.sacco-button-whatsapp {
  background: #16884e;
  color: #fff;
}

.sacco-button-call {
  border-color: #16884e;
  background: #fff;
  color: #0b5c39;
}

.sacco-button:hover,
.sacco-button:focus-visible {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.zama-content .sacco-conversion-note {
  margin: 0.8rem 0 0;
  color: #466357;
  font-size: 0.9rem;
}

.sacco-mobile-actions {
  display: none;
}

.zama-pagination {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.zama-pagination .page-numbers {
  min-width: 2.4rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--zama-line);
  color: var(--zama-ink);
  text-align: center;
  text-decoration: none;
  font-weight: 900;
}

.zama-pagination .current {
  background: var(--zama-green);
  color: #fff;
}

.zama-footer {
  background: #082a1d;
  color: rgba(245, 250, 246, 0.82);
  padding: 2rem 0;
}

.zama-footer a {
  color: #b8f2cf;
}

@media (max-width: 900px) {
  .zama-header .zama-container,
  .zama-nav,
  .zama-hero-grid,
  .zama-layout {
    grid-template-columns: 1fr;
  }

  .zama-header .zama-container {
    align-items: flex-start;
    padding: 0.85rem 0;
  }

  .zama-nav {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .zama-post-grid {
    grid-template-columns: 1fr;
  }

  .sacco-hero-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .sacco-demo-panel {
    max-width: 640px;
  }
}

@media (max-width: 600px) {
  .zama-container {
    width: min(100% - 1rem, 1120px);
  }

  .zama-topbar .zama-container {
    justify-content: center;
  }

  .zama-topbar span {
    display: none;
  }

  .zama-logo img {
    width: 142px;
  }

  .zama-header .zama-container {
    min-height: 66px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.6rem 0;
  }

  .zama-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .zama-nav {
    display: none;
    width: 100%;
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding-top: 0.35rem;
  }

  .zama-nav.is-open {
    display: grid;
  }

  .zama-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem;
    border-radius: 8px;
    background: #f4f8f5;
  }

  .zama-nav .zama-cta {
    grid-column: 1 / -1;
  }

  .zama-nav a {
    font-size: 0.86rem;
  }

  .zama-nav .zama-cta {
    padding: 0.55rem 0.8rem;
  }

  .zama-hero {
    padding: 1.5rem 0;
  }

  .zama-hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .single-post.postid-800 .zama-hero h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
    line-height: 1.02;
  }

  .sacco-demo-panel {
    display: none;
  }

  .zama-search form {
    flex-direction: column;
  }

  .zama-main {
    padding: 1rem 0;
  }

  .zama-card-body,
  .zama-panel {
    padding: 0.85rem;
  }

  body:has(.sacco-mobile-actions) {
    padding-bottom: 72px;
  }

  .sacco-conversion-box {
    border-radius: 14px;
  }

  .sacco-conversion-actions,
  .sacco-conversion-benefits,
  .sacco-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sacco-button {
    width: 100%;
  }

  .sacco-mobile-actions {
    position: fixed;
    z-index: 9999;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 8px;
    background: #082a1d;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  }

  .sacco-mobile-actions a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #0b5c39;
    font-weight: 900;
    text-decoration: none;
  }

  .sacco-mobile-actions a:last-child {
    background: #16884e;
    color: #fff;
  }
}
