/*
Theme Name:  MeRuWASCO
Theme URI:   https://meruwasco.co.ke
Author:      MeRuWASCO Web Team
Author URI:  https://meruwasco.co.ke
Description: A professional custom WordPress theme for Meru County Rural Water and Sanitation Company Limited (MeRuWASCO). Designed for water utility companies in Kenya.
Version:     1.0.1
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meruwasco
Tags: water-utility, kenya, county-government, custom-theme
*/

/* =====================================================
   CSS CUSTOM PROPERTIES
   ===================================================== */
:root {
  --color-primary:       #005B9F;
  --color-primary-dark:  #003D6B;
  --color-primary-light: #1A7DC0;
  --color-secondary:     #00A9CE;
  --color-accent:        #F5A623;
  --color-accent-dark:   #D4891A;
  --color-dark:          #0D1F35;
  --color-mid:           #3A5068;
  --color-grey:          #6B8299;
  --color-light-grey:    #C5D5E0;
  --color-off-white:     #F0F6FA;
  --color-white:         #FFFFFF;
  --color-success:       #27AE60;
  --color-warning:       #F39C12;
  --color-danger:        #E74C3C;

  --font-heading: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
  --font-body:    'Source Sans 3', 'Source Sans Pro', 'Segoe UI', Arial, sans-serif;

  --space-xl:  2.5rem;
  --space-2xl: 3rem;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(0,91,159,0.08);
  --shadow-md: 0 4px 20px rgba(0,91,159,0.14);
  --shadow-lg: 0 10px 40px rgba(0,91,159,0.18);

  --transition: 0.28s ease;

  --container-max:  1200px;
  --header-height:  80px;
  --topbar-height:  40px;
}

/* =====================================================
   RESET & BASE
   FIX 1 — overflow-x hidden on html AND body stops
   any element from ever causing horizontal scroll
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;   /* FIX 1 */
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;        /* FIX 1 */
  overflow-wrap: break-word; /* FIX 7 — prevent long words causing overflow */
  word-break: break-word;    /* FIX 7 */
}

img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-secondary); }
ul   { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-dark);
}
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =====================================================
   CONTAINER
   FIX 8 — clamp() padding keeps it comfortable on
   every screen without being too wide or too cramped
   ===================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.section-pad    { padding: var(--space-2xl) 0; }
.section-pad-sm { padding: var(--space-xl) 0; }
.text-center { text-align: center; }
.text-white  { color: var(--color-white) !important; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}
.section-title--white { color: var(--color-white); }

.section-subtitle {
  font-size: 1rem;
  color: var(--color-mid);
  max-width: 600px;
}
.section-header { margin-bottom: 3rem; }

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--color-accent);
  margin-top: 0.75rem;
  border-radius: 2px;
}
.text-center .section-title::after { margin-left: auto; margin-right: auto; }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245,166,35,0.4);
}
.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-outline-white:hover { background: var(--color-white); color: var(--color-primary); }

.btn-secondary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* =====================================================
   TOP BAR
   FIX 3 — width:100% ensures bar fills the viewport
   ===================================================== */
.topbar {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  height: var(--topbar-height);
  width: 100%;        /* FIX 3 */
  display: flex;
  align-items: center;
  position: relative;
  z-index: 200;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  overflow: hidden;
  min-width: 0;
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}
.topbar__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  white-space: nowrap;
}
.topbar__item svg { opacity: 0.7; flex-shrink: 0; }
.topbar__item a   { color: rgba(255,255,255,0.85); }
.topbar__item a:hover { color: var(--color-accent); }

.topbar__social { display: flex; align-items: center; gap: 0.5rem; }
.topbar__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  transition: all var(--transition);
  flex-shrink: 0;
}
.topbar__social a:hover { background: var(--color-accent); color: var(--color-dark); }

.topbar__divider {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* =====================================================
   SITE HEADER
   FIX 3 — width:100% fills the viewport correctly
   ===================================================== */
.site-header {
  background: var(--color-white);
  height: var(--header-height);
  width: 100%;        /* FIX 3 */
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.14); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo { width: auto; height: 50px; object-fit: contain; }
.site-branding__text { line-height: 1.2; }
.site-branding__name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary);
  display: block;
}
.site-branding__tagline {
  font-size: 0.68rem;
  color: var(--color-mid);
  font-weight: 500;
  display: block;
}

/* =====================================================
   PRIMARY NAVIGATION
   ===================================================== */
.main-nav { display: flex; align-items: center; }
.main-nav > ul { display: flex; align-items: center; }
.main-nav > ul > li { position: relative; }

.main-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-dark);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a {
  color: var(--color-primary);
  background: var(--color-off-white);
}

.main-nav > ul > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
  transition: transform var(--transition);
}
.main-nav > ul > li.menu-item-has-children:hover > a::after { transform: rotate(180deg); }

.main-nav .sub-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,91,159,0.08);
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 500;
}
.main-nav > ul > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.main-nav .sub-menu li a {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-mid);
  transition: all var(--transition);
}
.main-nav .sub-menu li a:hover {
  color: var(--color-primary);
  background: var(--color-off-white);
  padding-left: 1.4rem;
}

.header-cta { flex-shrink: 0; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-shrink: 0;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =====================================================
   HERO SLIDER
   FIX 2 — removed the broken double-offset calc().
   Content sits inside .container which already handles
   centering — no extra margin-left needed.
   ===================================================== */
.hero-slider {
  position: relative;
  overflow: hidden;
  height: 560px;
  background: var(--color-primary-dark);
  width: 100%;
  max-width: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease;
  display: flex;
  align-items: center;
}
.hero-slide.active { opacity: 1; z-index: 2; }

.hero-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 7s ease;
}
.hero-slide.active .hero-slide__bg { transform: scale(1); }

.hero-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,35,65,0.82) 0%,
    rgba(0,91,159,0.45) 55%,
    transparent 100%
  );
}

/* FIX 2 — margin:0, container padding handles alignment */
.hero-slide__content {
  position: relative;
  z-index: 3;
  max-width: 600px;
  margin: 0;
}

.hero-badge {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.2rem;
}
.hero-slide__title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-slide__subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.hero-slide__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hero-controls {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}
.hero-dot.active {
  background: var(--color-white);
  width: 24px;
  border-radius: 4px;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.15);
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
  color: white;
  backdrop-filter: blur(6px);
}
.hero-arrow:hover { background: var(--color-accent); color: var(--color-dark); }
.hero-arrow--prev { left: 1rem; }
.hero-arrow--next { right: 1rem; }

/* =====================================================
   QUICK LINKS
   FIX 4 — auto-fit with min column width: grid wraps
   naturally without ever causing overflow. Borders are
   applied via outline on the grid container instead of
   per-item so they work cleanly with any column count.
   ===================================================== */
.quick-links {
  background: var(--color-white);
  padding: 1.5rem 0;
  box-shadow: 0 6px 24px rgba(0,91,159,0.07);
  position: relative;
  z-index: 5;
  overflow: hidden;
  width: 100%;
}

.quick-links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  border: 1px solid var(--color-off-white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.quick-link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  text-decoration: none;
  color: var(--color-dark);
  border-right: 1px solid var(--color-off-white);
  border-bottom: 1px solid var(--color-off-white);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.quick-link-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.quick-link-item:hover { background: var(--color-off-white); color: var(--color-primary); }
.quick-link-item:hover::before { transform: scaleX(1); }

.quick-link-item__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  color: var(--color-primary);
}
.quick-link-item:hover .quick-link-item__icon {
  background: var(--color-primary);
  color: white;
}
.quick-link-item__label {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
  text-align: center;
  line-height: 1.3;
}

/* =====================================================
   STATS STRIP
   ===================================================== */
.stats-strip {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.stats-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/svg%3E");
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-right: none; }
.stat-item__number {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-item__number span { color: var(--color-accent); }
.stat-item__label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  font-family: var(--font-heading);
}

/* =====================================================
   ABOUT SNIPPET
   ===================================================== */
.about-snippet {
  padding: var(--space-2xl) 0;
  background: var(--color-white);
  overflow: hidden;
}
.about-snippet .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-snippet__image { position: relative; }
.about-snippet__img-main {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.about-snippet__badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1rem;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.about-snippet__badge-num {
  font-size: 2rem; font-weight: 800;
  font-family: var(--font-heading);
  color: var(--color-accent);
  line-height: 1; display: block;
}
.about-snippet__badge-text {
  font-size: 0.72rem; font-weight: 700;
  opacity: 0.85; text-transform: uppercase; letter-spacing: 0.06em;
}
.about-snippet__values { margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.75rem; }
.value-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.value-item__icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--color-off-white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--color-primary);
}
.value-item__text { font-size: 0.9rem; color: var(--color-mid); padding-top: 0.35rem; }
.value-item__text strong { color: var(--color-dark); }

/* =====================================================
   SERVICES SECTION
   ===================================================== */
.services-section { padding: var(--space-2xl) 0; background: var(--color-off-white); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform var(--transition);
  transform-origin: bottom;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(0,91,159,0.08); }
.service-card:hover::before { transform: scaleY(1); }
.service-card__icon {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  background: var(--color-off-white);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--color-primary);
  transition: all var(--transition);
}
.service-card:hover .service-card__icon { background: var(--color-primary); color: white; }
.service-card__title { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.65rem; color: var(--color-dark); }
.service-card__desc  { font-size: 0.88rem; color: var(--color-mid); line-height: 1.7; margin-bottom: 1.1rem; }
.service-card__link  {
  font-size: 0.83rem; font-weight: 700; font-family: var(--font-heading);
  color: var(--color-primary);
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: gap var(--transition);
}
.service-card__link:hover { gap: 0.8rem; color: var(--color-secondary); }

/* =====================================================
   HOW TO PAY (M-PESA)
   ===================================================== */
.pay-section { padding: var(--space-2xl) 0; background: var(--color-white); }
.pay-section .container { display: grid; grid-template-columns: 55% 1fr; gap: 2.5rem; align-items: start; }
.pay-section__steps { display: flex; flex-direction: column; gap: 0.85rem; margin: 1.5rem 0; }
.pay-step {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-secondary);
}
.pay-step__num { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: var(--color-primary); width: 1.8rem; flex-shrink: 0; }
.pay-step__text { font-size: 0.88rem; color: var(--color-mid); }
.pay-step__text strong { color: var(--color-dark); }

.mpesa-card {
  background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: white;
  text-align: center;
  box-shadow: 0 12px 40px rgba(46,125,50,0.3);
  position: relative;
  overflow: hidden;
}
.mpesa-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.mpesa-logo { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 900; color: white; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.mpesa-logo span { color: #f9c74f; }
.mpesa-label { font-size: 0.78rem; opacity: 0.8; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.08em; }
.mpesa-detail { background: rgba(255,255,255,0.12); border-radius: var(--radius-md); padding: 1.1rem; margin-bottom: 0.85rem; }
.mpesa-detail__label { font-size: 0.7rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.3rem; }
.mpesa-detail__value { font-size: 1.9rem; font-weight: 800; font-family: var(--font-heading); letter-spacing: 0.04em; }
.mpesa-note { font-size: 0.78rem; opacity: 0.75; margin-top: 1rem; }

/* =====================================================
   NEWS SECTION
   ===================================================== */
.news-section { padding: var(--space-2xl) 0; background: var(--color-off-white); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.news-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card__img { width: 100%; height: 190px; object-fit: cover; }
.news-card__img-placeholder {
  width: 100%; height: 190px;
  background: linear-gradient(135deg, var(--color-off-white), var(--color-light-grey));
  display: flex; align-items: center; justify-content: center;
  color: var(--color-grey);
}
.news-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.news-card__cat { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-secondary); margin-bottom: 0.4rem; display: block; }
.news-card__title { font-size: 0.95rem; font-weight: 700; color: var(--color-dark); margin-bottom: 0.65rem; line-height: 1.4; flex: 1; }
.news-card__title a { color: inherit; }
.news-card__title a:hover { color: var(--color-primary); }
.news-card__meta { display: flex; align-items: center; gap: 1rem; font-size: 0.76rem; color: var(--color-grey); margin-top: auto; padding-top: 0.85rem; border-top: 1px solid var(--color-off-white); }

/* =====================================================
   WATER SCHEMES
   ===================================================== */
.schemes-section {
  padding: var(--space-2xl) 0;
  background: var(--color-primary-dark);
  position: relative;
  overflow: hidden;
  width: 100%;
}
.schemes-section::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.04;
  background: repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 0, transparent 50%);
  background-size: 24px 24px;
}
.schemes-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.85rem; position: relative; }
.scheme-item {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 1.1rem 0.9rem;
  text-align: center;
  transition: all var(--transition);
}
.scheme-item:hover { background: rgba(255,255,255,0.14); border-color: var(--color-accent); transform: translateY(-3px); }
.scheme-item__icon { width: 36px; height: 36px; border-radius: 50%; background: var(--color-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 0.65rem; color: var(--color-dark); }
.scheme-item__name { font-size: 0.82rem; font-weight: 700; font-family: var(--font-heading); color: var(--color-white); line-height: 1.3; }

/* =====================================================
   PARTNERS
   ===================================================== */
.partners-section { padding: var(--space-xl) 0; background: var(--color-white); border-top: 1px solid var(--color-off-white); }
.partners-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem 2rem; }
.partner-item { opacity: 0.55; transition: opacity var(--transition); filter: grayscale(100%); }
.partner-item:hover { opacity: 1; filter: grayscale(0%); }
.partner-item__placeholder { background: var(--color-off-white); border-radius: var(--radius-md); padding: 0.7rem 1.3rem; font-size: 0.78rem; font-weight: 700; color: var(--color-mid); text-align: center; white-space: nowrap; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer { background: var(--color-dark); color: rgba(255,255,255,0.75); width: 100%; }
.footer-main { padding: 2rem 0 1.5rem; }
.footer-main .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 1.75rem; }

.footer-col__title {
  font-family: var(--font-heading);
  font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}
.footer-brand__logo { height: 40px; width: auto; margin-bottom: 0.75rem; }
.footer-brand__name { font-size: 0.95rem; font-weight: 800; font-family: var(--font-heading); color: var(--color-white); line-height: 1.3; margin-bottom: 0.2rem; }
.footer-brand__sub  { font-size: 0.75rem; opacity: 0.6; margin-bottom: 0.85rem; }
.footer-brand__desc { font-size: 0.82rem; line-height: 1.6; margin-bottom: 0.85rem; }
.footer-social { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }
.footer-social a { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.75); transition: all var(--transition); }
.footer-social a:hover { background: var(--color-accent); color: var(--color-dark); }
.footer-links ul li { margin-bottom: 0.35rem; }
.footer-links ul li a { font-size: 0.84rem; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 0.4rem; transition: all var(--transition); }
.footer-links ul li a:hover { color: var(--color-accent); padding-left: 0.3rem; }
.footer-links ul li a::before { content: '›'; color: var(--color-accent); font-size: 1rem; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.6rem; font-size: 0.82rem; }
.footer-contact-item__icon { width: 30px; height: 30px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--color-accent); }
.footer-contact-item__text { line-height: 1.5; }
.footer-contact-item__text a { color: rgba(255,255,255,0.7); }
.footer-contact-item__text a:hover { color: var(--color-accent); }
.footer-mpesa { background: rgba(255,255,255,0.05); border-radius: var(--radius-md); padding: 0.85rem; border: 1px solid rgba(255,255,255,0.1); margin-top: 0.4rem; }
.footer-mpesa__title { font-size: 0.72rem; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.footer-mpesa__num { font-size: 1.3rem; font-weight: 800; font-family: var(--font-heading); color: var(--color-white); letter-spacing: 0.05em; }
.footer-mpesa__sub { font-size: 0.72rem; opacity: 0.6; margin-top: 0.2rem; }
.footer-bottom { background: rgba(0,0,0,0.3); padding: 1.1rem 0; font-size: 0.78rem; }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-bottom__links a { color: rgba(255,255,255,0.5); }
.footer-bottom__links a:hover { color: var(--color-accent); }

/* =====================================================
   PAGE HERO (inner pages)
   ===================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.page-hero__title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; color: var(--color-white); margin-bottom: 0.5rem; }
.breadcrumb { display: flex; align-items: center; gap: 0.4rem; font-size: 0.83rem; color: rgba(255,255,255,0.65); flex-wrap: wrap; }
.breadcrumb a { color: rgba(255,255,255,0.65); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb__sep { opacity: 0.4; }

/* =====================================================
   CONTENT AREA
   FIX 5 — tables get overflow-x:auto so they scroll
   instead of breaking the page layout on mobile
   ===================================================== */
.main-content { padding: var(--space-2xl) 0; }

.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.5rem 0 0.75rem; color: var(--color-dark); }
.entry-content ul, .entry-content ol { margin: 0.75rem 0 0.75rem 1.5rem; list-style: disc; }
.entry-content li { margin-bottom: 0.4rem; }

/* FIX 5 — scrollable table wrapper */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  /* Scroll horizontally on small screens */
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.entry-content table thead,
.entry-content table tbody { display: table; width: 100%; }
.entry-content table th { background: var(--color-primary); color: var(--color-white); padding: 0.7rem 1rem; text-align: left; font-weight: 700; white-space: nowrap; }
.entry-content table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--color-off-white); }
.entry-content table tr:nth-child(even) td { background: var(--color-off-white); }

/* =====================================================
   WHATSAPP FLOAT
   ===================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  z-index: 999;
  transition: all var(--transition);
}
.whatsapp-float:hover { transform: scale(1.1); color: white; }

/* =====================================================
   MOBILE NAVIGATION OVERLAY
   ===================================================== */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-white);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  width: 100%;
  max-width: 100vw;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav__close { display: flex; justify-content: flex-end; margin-bottom: 1.25rem; }
.mobile-nav__close button { background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--color-dark); }
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav ul li a { display: block; padding: 0.85rem 0; font-size: 1rem; font-weight: 700; font-family: var(--font-heading); color: var(--color-dark); border-bottom: 1px solid var(--color-off-white); }
.mobile-nav .sub-menu { padding-left: 1rem; }
.mobile-nav .sub-menu li a { font-size: 0.88rem; font-weight: 500; color: var(--color-mid); }

/* =====================================================
   WORDPRESS SPECIFIC
   ===================================================== */
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
/* FIX — alignfull must not exceed viewport */
.alignfull { width: 100%; max-width: 100%; }

.wp-block-image figcaption { font-size: 0.78rem; color: var(--color-grey); text-align: center; margin-top: 0.5rem; }

.skip-link { position: absolute; top: -100%; left: 1rem; background: var(--color-primary); color: white; padding: 0.5rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 700; z-index: 9999; }
.skip-link:focus { top: 0; }

.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* =====================================================
   RESPONSIVE BREAKPOINTS
   FIX 6 — complete, gap-free breakpoint ladder
   1200 → 1024 → 900 → 680 → 480 → 360
   ===================================================== */

/* Large desktops: tighten nav */
@media (max-width: 1200px) {
  .main-nav > ul > li > a { padding: 0.45rem 0.55rem; font-size: 0.81rem; }
  .about-snippet .container { gap: 1.5rem; }
  .pay-section .container   { gap: 2rem; }
}

/* Tablets landscape */
@media (max-width: 1024px) {
  .footer-main .container { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .schemes-grid           { grid-template-columns: repeat(4, 1fr); }
  .about-snippet .container { gap: 1.5rem; }
}

/* Tablets portrait — switch to mobile nav */
@media (max-width: 900px) {
  :root { --header-height: 66px; --space-2xl: 2.5rem; }

  .topbar      { display: none; }
  .main-nav    { display: none; }
  .header-cta  { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav  { display: block; }

  .hero-slider { height: 440px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(4) { border-right: none; }

  .about-snippet .container { grid-template-columns: 1fr; gap: 2rem; }
  .about-snippet__badge { display: none; }
  .about-snippet__img-main { height: 220px; }

  .services-grid { grid-template-columns: 1fr 1fr; }
  .pay-section .container { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .news-grid     { grid-template-columns: 1fr 1fr; }
  .schemes-grid  { grid-template-columns: repeat(3, 1fr); }
}

/* Large phones */
@media (max-width: 680px) {
  :root { --space-2xl: 2rem; }

  .hero-slider           { height: 380px; }
  .hero-slide__subtitle  { font-size: 0.9rem; }

  .services-grid { grid-template-columns: 1fr; }
  .news-grid     { grid-template-columns: 1fr; }
  .schemes-grid  { grid-template-columns: repeat(2, 1fr); }

  .footer-main .container { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .footer-bottom__links { justify-content: center; }
}

/* Small phones — FIX 6 */
@media (max-width: 480px) {
  :root { --header-height: 60px; --space-2xl: 1.75rem; }

  .hero-slider  { height: 320px; }
  .hero-badge   { display: none; }

  /* Stack hero buttons */
  .hero-slide__actions { flex-direction: column; }
  .hero-slide__actions .btn { width: 100%; justify-content: center; }
  /* Hide secondary hero button to save space */
  .hero-slide__actions .btn-outline-white { display: none; }

  .mpesa-card { padding: 1.5rem 1.25rem; }
  .mpesa-detail__value { font-size: 1.6rem; }

  .service-card { padding: 1.25rem; }
  .news-card__body { padding: 1rem; }

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

/* Very small phones */
@media (max-width: 360px) {
  .stat-item__number { font-size: 1.5rem; }
  .schemes-grid      { grid-template-columns: 1fr 1fr; }
  .btn { padding: 0.6rem 1rem; font-size: 0.82rem; }
}

/* =====================================================
   PAYMENT SECTION — EXTENDED STYLES
   ===================================================== */

/* Payment option blocks */
.pay-option-block {
  background: var(--color-off-white);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1.25rem 1.1rem;
  border-left: 4px solid var(--color-primary);
}

.pay-option-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.pay-option-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}
.pay-option-icon--mpesa  { background: #2E7D32; }
.pay-option-icon--bank   { background: var(--color-primary); }
.pay-option-icon--office { background: var(--color-secondary); }

.pay-option-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
  margin-bottom: 0.2rem;
}
.pay-option-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-dark);
  margin: 0;
}

/* Bank details table */
.pay-bank-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.pay-bank-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-light-grey);
  align-items: flex-start;
}
.pay-bank-row:last-child { border-bottom: none; }
.pay-bank-label {
  font-weight: 700;
  color: var(--color-mid);
  min-width: 110px;
  flex-shrink: 0;
}
.pay-bank-value { color: var(--color-dark); font-weight: 600; }

/* Right column stacked card + tips */
.pay-section__card-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Billing tips card */
.pay-tips-card {
  background: var(--color-off-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--color-light-grey);
}
.pay-tips-card h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}
.pay-tips-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}
.pay-tips-card ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--color-mid);
  line-height: 1.5;
}
.pay-tips-card ul li svg { flex-shrink: 0; margin-top: 3px; color: var(--color-primary); }
.pay-tips-link {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--color-primary);
}
.pay-tips-link:hover { color: var(--color-secondary); }

/* Responsive payment section */
@media (max-width: 900px) {
  .pay-section .container { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .pay-section__card-wrap { flex-direction: row; gap: 1.25rem; }
  .pay-section__card-wrap .mpesa-card,
  .pay-section__card-wrap .pay-tips-card { flex: 1; }
}

@media (max-width: 640px) {
  .pay-section__card-wrap { flex-direction: column; }
  .pay-bank-row { flex-direction: column; gap: 0.1rem; }
  .pay-bank-label { min-width: auto; }
}
