/*
Theme Name: Zivo
Theme URI: https://zivo.co.ke/blog
Author: Zivo
Author URI: https://zivo.co.ke
Description: WordPress theme aligned with the zivo.co.ke marketing site.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: zivo
*/

:root {
  --zivo-ink: #08111f;
  --zivo-muted: #526174;
  --zivo-line: #d8e2ea;
  --zivo-green: #07a77a;
  --zivo-green-dark: #046c5b;
  --zivo-blue: #3157d5;
  --zivo-sky: #edf5ff;
  --zivo-mint: #eefcf6;
  --zivo-paper: #f4f7fb;
  --zivo-panel: #ffffff;
  --zivo-shadow: 0 18px 48px rgba(8, 17, 31, 0.08);
  --zivo-radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--zivo-ink);
  background: var(--zivo-paper);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.zivo-shell {
  width: min(100% - 36px, 1200px);
  margin: 0 auto;
}

.zivo-site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(216, 226, 234, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(8, 17, 31, 0.05);
}

.zivo-nav {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.zivo-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.zivo-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #07131f;
  box-shadow: 0 10px 24px rgba(8, 17, 31, 0.16);
}

.zivo-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zivo-brand-text {
  display: grid;
  gap: 5px;
}

.zivo-brand-title {
  color: var(--zivo-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.zivo-brand-subtitle {
  color: var(--zivo-muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.zivo-nav-links,
.zivo-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.zivo-nav-links a {
  color: #435166;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.zivo-nav-links a:hover,
.zivo-nav-links a[aria-current="page"] {
  color: var(--zivo-green-dark);
}

.zivo-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--zivo-line);
  border-radius: var(--zivo-radius);
  padding: 0 17px;
  background: #fff;
  color: var(--zivo-ink);
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 1px 1px rgba(8, 17, 31, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.zivo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(8, 17, 31, 0.1);
}

.zivo-btn-primary {
  border-color: var(--zivo-green-dark);
  background: linear-gradient(135deg, var(--zivo-green-dark), var(--zivo-green));
  color: #fff;
}

.zivo-btn-primary:hover {
  background: var(--zivo-green-dark);
  color: #fff;
}

.zivo-btn-light {
  background: #fff;
  color: var(--zivo-ink);
}

.zivo-mobile-menu {
  display: none;
  position: relative;
}

.zivo-mobile-menu summary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--zivo-line);
  border-radius: 10px;
  padding: 0 13px;
  background: #fff;
  color: var(--zivo-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  list-style: none;
}

.zivo-mobile-menu summary::-webkit-details-marker {
  display: none;
}

.zivo-mobile-menu nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  width: min(300px, calc(100vw - 24px));
  max-height: calc(100vh - 92px);
  gap: 2px;
  overflow-y: auto;
  border: 1px solid var(--zivo-line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(8, 17, 31, 0.18);
}

.zivo-mobile-menu nav a {
  border-radius: 8px;
  padding: 11px 12px;
  color: #334155;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.zivo-mobile-menu nav a:hover,
.zivo-mobile-menu nav a:focus {
  background: var(--zivo-mint);
  color: var(--zivo-green-dark);
}

.zivo-blog-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(216, 226, 234, 0.86);
  background:
    linear-gradient(90deg, rgba(4, 108, 91, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(49, 87, 213, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 54%, #eff8f3 100%);
  background-size: 72px 72px, 72px 72px, auto;
  padding: clamp(48px, 7vw, 78px) 0 clamp(36px, 5vw, 56px);
}

.zivo-kicker {
  display: inline-flex;
  margin: 0;
  color: var(--zivo-green-dark);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zivo-hero-title {
  max-width: 14ch;
  margin: 16px 0 0;
  color: #0c1d35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 60px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.zivo-hero-copy {
  max-width: 620px;
  margin: 18px 0 0;
  color: #44536a;
  font-size: 17px;
  line-height: 1.55;
}

.zivo-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.zivo-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.zivo-chip {
  border: 1px solid var(--zivo-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.zivo-main {
  padding: 42px 0 64px;
}

.zivo-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 22px;
}

.zivo-section-title {
  margin: 10px 0 0;
  color: var(--zivo-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.08;
}

.zivo-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.zivo-post-card {
  display: flex;
  min-height: 100%;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--zivo-line);
  border-radius: 14px;
  background: var(--zivo-panel);
  box-shadow: var(--zivo-shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.zivo-post-card:hover {
  border-color: #bdd4e6;
  box-shadow: 0 18px 44px rgba(8, 17, 31, 0.08);
  transform: translateY(-1px);
}

.zivo-post-card-media {
  background:
    linear-gradient(135deg, rgba(7, 167, 122, 0.16), rgba(49, 87, 213, 0.1)),
    var(--zivo-mint);
}

.zivo-post-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.zivo-post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

.zivo-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.zivo-post-card h2,
.zivo-post-card h3 {
  margin: 0;
  color: var(--zivo-ink);
  font-size: 1.12rem;
  font-weight: 850;
  line-height: 1.25;
}

.zivo-excerpt {
  margin: 0;
  color: var(--zivo-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.zivo-read-more {
  margin-top: auto;
  padding-top: 8px;
  color: var(--zivo-green-dark);
  font-size: 0.9rem;
  font-weight: 950;
}

.zivo-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: start;
}

.zivo-article,
.zivo-widget,
.zivo-cta-card {
  border: 1px solid var(--zivo-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--zivo-shadow);
}

.zivo-article {
  padding: clamp(22px, 4vw, 44px);
}

.zivo-entry-title {
  margin: 0.75rem 0 1rem;
  color: #0c1d35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.zivo-cover {
  overflow: hidden;
  margin-bottom: 1.4rem;
  border: 1px solid var(--zivo-line);
  border-radius: 12px;
}

.zivo-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.zivo-entry-content {
  color: #1e293b;
  font-size: 1.03rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.zivo-entry-content > * + * {
  margin-top: 1rem;
}

.zivo-entry-content a {
  color: var(--zivo-green-dark);
  font-weight: 850;
}

.zivo-entry-content h2,
.zivo-entry-content h3 {
  margin: 2rem 0 0.75rem;
  color: var(--zivo-ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
}

.zivo-entry-content ul,
.zivo-entry-content ol {
  padding-left: 1.2rem;
}

.zivo-entry-content blockquote {
  margin: 1.5rem 0;
  border-left: 4px solid rgba(7, 167, 122, 0.45);
  padding: 0.7rem 1rem;
  color: #334155;
  background: var(--zivo-mint);
}

.zivo-entry-content table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.zivo-sidebar {
  display: grid;
  gap: 1rem;
}

.zivo-widget,
.zivo-cta-card {
  padding: 1.15rem;
}

.zivo-widget-title {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  font-weight: 950;
}

.zivo-widget ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zivo-widget li {
  color: #334155;
  font-size: 0.92rem;
  font-weight: 750;
}

.zivo-cta-card {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(4, 108, 91, 0.92), rgba(7, 167, 122, 0.95)),
    #046c5b;
}

.zivo-cta-card .zivo-kicker {
  color: rgba(255, 255, 255, 0.82);
}

.zivo-cta-card p {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.zivo-cta-card .zivo-btn-light {
  margin-top: 0.6rem;
}

.zivo-pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.zivo-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.zivo-pagination a,
.zivo-pagination span {
  min-width: 40px;
  border: 1px solid var(--zivo-line);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  background: #fff;
  text-align: center;
  font-weight: 850;
}

.zivo-pagination .current {
  border-color: transparent;
  background: var(--zivo-green-dark);
  color: #fff;
}

.zivo-site-footer {
  border-top: 1px solid rgba(216, 226, 234, 0.18);
  background:
    linear-gradient(135deg, rgba(7, 167, 122, 0.16), transparent 34%),
    linear-gradient(180deg, #061927 0%, #08111f 100%);
  color: #d7e4ef;
  padding: 64px 0 24px;
}

.zivo-footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) repeat(3, minmax(140px, 1fr));
  gap: 34px;
  align-items: start;
}

.zivo-footer-brand {
  display: grid;
  gap: 18px;
  max-width: 430px;
}

.zivo-footer-brand p {
  margin: 0;
  color: rgba(215, 228, 239, 0.76);
  font-size: 14px;
  line-height: 1.75;
  font-weight: 700;
}

.zivo-footer-contact {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 850;
}

.zivo-site-footer a {
  color: inherit;
  text-decoration: none;
}

.zivo-site-footer a:hover {
  color: #fff;
}

.zivo-footer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zivo-footer-pills a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.zivo-footer-pills a:hover {
  border-color: rgba(7, 167, 122, 0.84);
  background: rgba(7, 167, 122, 0.22);
}

.zivo-footer-column {
  display: grid;
  gap: 10px;
}

.zivo-footer-column h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zivo-footer-column a {
  color: rgba(215, 228, 239, 0.74);
  font-size: 14px;
  font-weight: 780;
}

.zivo-footer-column a:hover {
  color: #b7f7df;
}

.zivo-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  color: rgba(215, 228, 239, 0.66);
  font-size: 13px;
  font-weight: 800;
}

.zivo-footer-bottom span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

@media (max-width: 1060px) {
  .zivo-nav-links {
    display: none;
  }

  .zivo-mobile-menu {
    display: block;
  }

  .zivo-content-layout,
  .zivo-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .zivo-footer-brand {
    grid-column: 1 / -1;
    max-width: 680px;
  }

  .zivo-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .zivo-shell {
    width: min(100% - 24px, 1200px);
  }

  .zivo-nav {
    min-height: 64px;
    gap: 10px;
  }

  .zivo-actions .zivo-btn:not(.zivo-btn-primary) {
    display: none;
  }

  .zivo-post-grid,
  .zivo-content-layout,
  .zivo-footer-grid,
  .zivo-section-head {
    grid-template-columns: 1fr;
  }

  .zivo-section-head {
    display: grid;
    align-items: start;
  }

  .zivo-footer-bottom {
    display: grid;
  }
}
