/*
Theme Name: PMS Blog
Theme URI: https://pms.co.ke/blog/
Description: A PMS.co.ke child theme for the WordPress blog.
Author: Kayapro Technologies Limited
Template: wisteria
Version: 1.0.2
Text Domain: pms-blog
*/

:root {
  --pms-green-900: #0f5132;
  --pms-green-800: #146c43;
  --pms-green-700: #198754;
  --pms-green-100: #dff5ea;
  --pms-green-50: #effaf5;
  --pms-slate-950: #0f172a;
  --pms-slate-800: #1e293b;
  --pms-slate-600: #475569;
  --pms-slate-500: #64748b;
  --pms-slate-300: #cbd5e1;
  --pms-slate-200: #e2e8f0;
  --pms-slate-100: #f1f5f9;
  --pms-surface: #ffffff;
  --pms-page: #f5f7fa;
  --pms-radius: 20px;
  --pms-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--pms-page);
  color: var(--pms-slate-950);
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
  color: var(--pms-green-800);
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

a:hover,
a:focus {
  color: var(--pms-green-900);
}

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

.screen-reader-text:focus {
  border-radius: 8px;
  color: var(--pms-green-900);
}

.site-wrapper {
  overflow: clip;
}

/* Header */
.pms-blog-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.pms-blog-header__inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.pms-blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--pms-green-800);
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
}

.pms-blog-brand:hover,
.pms-blog-brand:focus {
  color: var(--pms-green-900);
  text-decoration: none;
}

.pms-blog-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.pms-blog-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.pms-blog-nav__links,
.pms-blog-nav__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pms-blog-nav__links a {
  position: relative;
  color: var(--pms-green-900);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.pms-blog-nav__links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--pms-green-700);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

.pms-blog-nav__links a:hover::after,
.pms-blog-nav__links a:focus::after,
.pms-blog-nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.pms-blog-button {
  min-height: 40px;
  padding: 9px 20px;
  border: 1px solid var(--pms-green-800);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--pms-green-900);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.pms-blog-button:hover,
.pms-blog-button:focus {
  background: var(--pms-green-50);
  color: var(--pms-green-900);
  text-decoration: none;
  transform: translateY(-1px);
}

.pms-blog-button--primary {
  background: var(--pms-green-800);
  color: #fff;
}

.pms-blog-button--primary:hover,
.pms-blog-button--primary:focus {
  background: var(--pms-green-900);
  color: #fff;
}

.pms-blog-menu-toggle {
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--pms-slate-200);
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--pms-green-900);
  font-size: 18px;
}

.pms-blog-menu-toggle:hover,
.pms-blog-menu-toggle:focus,
.pms-blog-menu-toggle:active {
  border-color: var(--pms-green-700) !important;
  background: #fff !important;
  color: var(--pms-green-900) !important;
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
}

/* Page hero */
.pms-blog-hero {
  padding: 76px 20px 54px;
  background: var(--pms-green-50);
  border-bottom: 1px solid #dcefe5;
  text-align: center;
}

.pms-blog-hero__inner {
  width: min(780px, 100%);
  margin: 0 auto;
}

.pms-blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--pms-green-800);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(20, 108, 67, 0.08);
}

.pms-blog-hero h1 {
  margin: 0;
  color: var(--pms-slate-950);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.pms-blog-hero p {
  max-width: 680px;
  margin: 20px auto 0;
  color: var(--pms-slate-600);
  font-size: 19px;
  line-height: 1.65;
}

.pms-blog-hero__actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Content layout */
.site-content {
  padding: 56px 0 72px;
  background: var(--pms-page);
}

.site-content > .container,
.site-content .container {
  width: min(1180px, calc(100% - 40px));
  max-width: none;
  padding: 0;
}

.site-content .row {
  margin-right: -14px;
  margin-left: -14px;
}

.site-content .row > * {
  padding-right: 14px;
  padding-left: 14px;
}

.content-area {
  flex: 0 0 68%;
  max-width: 68%;
}

.sidebar-area {
  flex: 0 0 32%;
  max-width: 32%;
}

.page-header {
  margin: 0 0 28px;
  padding: 30px 34px;
  border: 1px solid #dcefe5;
  border-radius: var(--pms-radius);
  background: var(--pms-green-50);
  box-shadow: 0 12px 35px rgba(15, 81, 50, 0.06);
}

.page-header .page-title {
  margin: 0;
  color: var(--pms-slate-950);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.page-header .page-title span {
  color: var(--pms-green-800);
}

.taxonomy-description {
  margin-top: 12px;
  color: var(--pms-slate-600);
}

.taxonomy-description p:last-child {
  margin-bottom: 0;
}

.post-wrapper-archive article {
  margin: 0 0 26px;
  padding: 0;
  border: 1px solid var(--pms-slate-200);
  border-radius: var(--pms-radius);
  overflow: hidden;
  background: var(--pms-surface);
  box-shadow: var(--pms-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-wrapper-archive article:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

.post-content-wrapper-archive {
  display: grid;
  grid-template-columns: minmax(250px, 40%) 1fr;
  align-items: stretch;
}

.entry-image-wrapper-archive,
.entry-image-wrapper-archive .post-thumbnail,
.entry-image-wrapper-archive .post-thumbnail a {
  width: auto !important;
  height: 100%;
  min-height: 300px;
  margin: 0;
  display: block;
}

.entry-image-wrapper-archive img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.entry-data-wrapper-archive {
  width: auto !important;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.entry-meta-header-before {
  margin: 0 0 13px;
}

.entry-meta-header-before a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--pms-green-100);
  color: var(--pms-green-900);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.entry-title,
.entry-title a {
  color: var(--pms-slate-950);
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.entry-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.16;
}

.entry-title a:hover,
.entry-title a:focus {
  color: var(--pms-green-800);
}

.entry-meta-header-after,
.entry-meta-single {
  margin-top: 16px;
  color: var(--pms-slate-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entry-meta-header-after a,
.entry-meta-single a {
  color: var(--pms-slate-500);
}

.entry-meta a::before,
.entry-meta span::before {
  color: var(--pms-green-700) !important;
}

.entry-summary {
  margin-top: 18px;
  color: var(--pms-slate-600);
  font-size: 16px;
  line-height: 1.65;
}

.entry-summary p:last-child {
  margin-bottom: 0;
}

/* Single post */
.post-wrapper-single {
  padding: 38px;
  border: 1px solid var(--pms-slate-200);
  border-radius: var(--pms-radius);
  background: #fff;
  box-shadow: var(--pms-shadow);
}

.entry-header-wrapper-single {
  margin-bottom: 28px;
  text-align: left;
}

.entry-title-single {
  margin: 14px 0 0;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.08;
}

.pms-single-featured-image {
  width: 100%;
  margin: 0 0 32px;
  border-radius: 16px;
  overflow: hidden;
}

.pms-single-featured-image img {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: cover;
}

.entry-content-single {
  color: var(--pms-slate-800);
  font-size: 18px;
  line-height: 1.78;
}

.entry-content-single h2,
.entry-content-single h3,
.entry-content-single h4 {
  margin-top: 1.6em;
  color: var(--pms-slate-950);
  font-weight: 800;
  line-height: 1.2;
}

.entry-content-single h2 {
  font-size: 32px;
}

.entry-content-single h3 {
  font-size: 26px;
}

.entry-content-single a {
  color: var(--pms-green-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.entry-content-single img,
.entry-content-single figure {
  border-radius: 14px;
}

.entry-content-single blockquote {
  margin: 28px 0;
  padding: 22px 26px;
  border-left: 4px solid var(--pms-green-700);
  border-radius: 0 14px 14px 0;
  background: var(--pms-green-50);
  color: var(--pms-slate-800);
}

.entry-content-single table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--pms-slate-200);
  border-radius: 12px;
  overflow: hidden;
}

.entry-content-single th,
.entry-content-single td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pms-slate-200);
}

.entry-content-single th {
  background: var(--pms-green-50);
  color: var(--pms-green-900);
}

.entry-meta-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--pms-slate-200);
}

.author-info,
.comments-area,
.post-navigation {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--pms-slate-200);
  border-radius: 16px;
  background: #fff;
}

/* Sidebar */
.sidebar-widget-area {
  position: sticky;
  top: 96px;
}

.widget {
  margin: 0 0 22px;
  padding: 26px;
  border: 1px solid var(--pms-slate-200);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.widget-title,
.widget h2,
.widget .wp-block-heading {
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--pms-green-700);
  color: var(--pms-green-900);
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget li {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--pms-slate-100);
}

.widget li:last-child {
  border-bottom: 0;
}

.widget a {
  color: var(--pms-slate-800);
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.widget a:hover,
.widget a:focus {
  color: var(--pms-green-800);
}

.widget_search .search-form {
  display: flex;
}

.widget_search input[type="search"] {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--pms-slate-300);
  border-radius: 999px 0 0 999px;
}

.widget_search .search-submit {
  border-radius: 0 999px 999px 0;
  background: var(--pms-green-800);
}

#block-4.widget {
  display: none;
}

/* Pagination */
.pagination,
.navigation.pagination {
  margin: 34px 0 0;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--pms-slate-200);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--pms-green-900);
  font-weight: 800;
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover,
.page-numbers:focus {
  border-color: var(--pms-green-800);
  background: var(--pms-green-800);
  color: #fff;
}

/* Footer */
.pms-blog-footer {
  padding: 52px 20px 22px;
  border-top: 1px solid var(--pms-slate-200);
  background: var(--pms-slate-100);
  color: var(--pms-slate-600);
}

.pms-blog-footer__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.pms-blog-footer__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1fr 1fr;
  gap: 46px;
}

.pms-blog-footer h2 {
  width: fit-content;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pms-green-700);
  color: var(--pms-green-900);
  font-size: 17px;
  font-weight: 800;
}

.pms-blog-footer p {
  margin: 0 0 18px;
  line-height: 1.6;
}

.pms-blog-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pms-blog-footer li {
  margin: 0 0 11px;
}

.pms-blog-footer a {
  color: var(--pms-green-900);
  text-decoration: none;
}

.pms-blog-footer a:hover,
.pms-blog-footer a:focus {
  color: var(--pms-green-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pms-blog-footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pms-blog-footer__contact a {
  padding: 8px 13px;
  border: 1px solid var(--pms-green-800);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
}

.pms-blog-footer__contact a:first-child {
  background: var(--pms-green-800);
  color: #fff;
}

.pms-blog-footer__bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--pms-slate-200);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--pms-slate-500);
  font-size: 13px;
}

.pms-blog-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
  border: 1px solid var(--pms-slate-300);
  border-radius: 12px;
  background: #fff;
  color: var(--pms-slate-950);
}

input:focus,
textarea:focus {
  border-color: var(--pms-green-700);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.12);
  outline: 0;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  border: 1px solid var(--pms-green-800);
  border-radius: 999px;
  background: var(--pms-green-800);
  color: #fff;
  font-weight: 800;
}

/* Responsive */
@media (max-width: 1100px) {
  .pms-blog-header__inner {
    width: min(100% - 28px, 1180px);
  }

  .pms-blog-nav__links {
    gap: 14px;
  }

  .pms-blog-nav__links a {
    font-size: 14px;
  }

  .pms-blog-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .pms-blog-menu-toggle {
    display: inline-flex;
  }

  .pms-blog-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--pms-slate-200);
    border-radius: 0 0 18px 18px;
    display: none;
    align-items: stretch;
    background: #fff;
    box-shadow: var(--pms-shadow);
  }

  .pms-blog-header.is-menu-open .pms-blog-nav {
    display: block;
  }

  .pms-blog-nav__links,
  .pms-blog-nav__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .pms-blog-nav__links a {
    padding: 11px 10px;
    border-radius: 10px;
  }

  .pms-blog-nav__links a:hover,
  .pms-blog-nav__links a:focus {
    background: var(--pms-green-50);
  }

  .pms-blog-nav__links a::after {
    display: none;
  }

  .pms-blog-nav__actions {
    margin-top: 12px;
    flex-direction: row;
  }

  .content-area,
  .sidebar-area {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .sidebar-area {
    margin-top: 30px;
  }

  .sidebar-widget-area {
    position: static;
  }
}

@media (max-width: 700px) {
  .pms-blog-header__inner {
    min-height: 66px;
  }

  .pms-blog-brand {
    font-size: 21px;
  }

  .pms-blog-brand img {
    width: 38px;
    height: 38px;
  }

  .pms-blog-hero {
    padding: 54px 20px 42px;
  }

  .pms-blog-hero p {
    font-size: 17px;
  }

  .site-content {
    padding: 34px 0 48px;
  }

  .site-content > .container,
  .site-content .container {
    width: min(100% - 28px, 1180px);
  }

  .page-header {
    padding: 24px;
  }

  .post-content-wrapper-archive {
    grid-template-columns: 1fr;
  }

  .entry-image-wrapper-archive,
  .entry-image-wrapper-archive .post-thumbnail,
  .entry-image-wrapper-archive .post-thumbnail a,
  .entry-image-wrapper-archive img {
    min-height: 230px;
    max-height: 280px;
  }

  .entry-data-wrapper-archive {
    padding: 24px;
  }

  .entry-title {
    font-size: 26px;
  }

  .post-wrapper-single {
    padding: 24px;
  }

  .entry-content-single {
    font-size: 17px;
  }

  .pms-blog-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pms-blog-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
