/* Democratic Party of Kenya — refreshed static site stylesheet */

:root {
  --green: #75ae21;
  --green-dark: #5c8a1a;
  --orange: #fe8c08;
  --orange-dark: #d9740f;
  --yellow: #fed03d;
  --ink: #2c2c2c;
  --muted: #666;
  --border: #e5e5e5;
  --bg-soft: #f7f7f5;
  --max: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; line-height: 1.25; color: var(--ink); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar {
  background: var(--green);
  color: #fff;
  font-size: 14px;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #fff; }
.topbar a:hover { color: #ffe9c9; }

/* Header */
.site-header { padding: 16px 0; border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; }
.brand img { height: 74px; width: auto; }

/* Nav */
nav.mainnav { background: var(--green); }
nav.mainnav ul { list-style: none; margin: 0; padding: 0; }
nav.mainnav ul.nav-top { display: flex; flex-wrap: wrap; }
nav.mainnav li { position: relative; flex: 1; }
nav.mainnav ul.nav-top > li > a {
  display: block; padding: 20px clamp(10px, 1.4vw, 18px); color: #fff;
  font-size: clamp(14px, 1.15vw, 17px); font-weight: 600;
  text-align: center; white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.12);
}
nav.mainnav ul.nav-top > li:hover > a, nav.mainnav a.active { background: var(--green-dark); }
nav.mainnav li.has-children > a::after {
  content: ''; display: inline-block; margin-left: 6px; vertical-align: middle;
  width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 6px solid rgba(255,255,255,0.85);
}
nav.mainnav li.has-children:hover > ul { display: block; }
nav.mainnav ul ul {
  display: none; position: absolute; top: 100%; left: 0; min-width: 320px;
  background: #fff; border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(0,0,0,0.12); z-index: 20;
  padding: 8px 0;
}
nav.mainnav ul ul li a { color: var(--ink); padding: 12px 22px; border: none; font-weight: 500; font-size: 17px; white-space: nowrap; }
nav.mainnav ul ul li a:hover { color: var(--orange); }
nav.mainnav .btn-register { background: var(--orange); }
nav.mainnav .btn-register:hover { background: var(--orange-dark); }
.nav-toggle { display: none; }

/* Page title bar */
.page-title-bar { background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 28px 0; }
.page-title-bar h1 { margin: 0; font-size: 30px; }
.page-title-bar .crumb { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* Hero (home) */
.hero { position: relative; color: #fff; height: 620px; overflow: hidden; }
.hero .slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; z-index: 1;
}
.hero .slide.active { opacity: 1; }
.hero .slide img { width: 100%; height: 620px; object-fit: cover; filter: brightness(0.75); }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0) 75%);
}
.hero-caption { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; z-index: 5; pointer-events: none; }
.hero-caption .wrap { width: 100%; pointer-events: none; }
.hero-caption .wrap a, .hero-caption .wrap .btn { pointer-events: auto; }
.hero-caption h1 { color: #fff; font-size: 44px; max-width: 760px; margin: 0 0 14px; }
.hero-caption p { max-width: 620px; font-size: 19px; margin: 0 0 24px; }
.hero-nav {
  position: absolute; bottom: 16px; z-index: 6;
  background: rgba(0,0,0,0.35); color: #fff; border: none; width: 40px; height: 40px;
  border-radius: 50%; font-size: 20px; cursor: pointer;
}
.hero-nav:hover { background: rgba(0,0,0,0.6); }
.hero-nav.prev { right: 74px; }
.hero-nav.next { right: 24px; }
.hero-dots { position: absolute; bottom: 22px; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; gap: 10px; }
.hero-dots button {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0;
}
.hero-dots button.active { background: var(--orange); border-color: var(--orange); }

.btn { display: inline-block; padding: 12px 26px; border-radius: 3px; font-weight: 600; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); color: #fff; }
.btn-outline { border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--green); }

/* Content sections */
main { padding: 48px 0; }
.section-title { font-size: 24px; border-left: 5px solid var(--orange); padding-left: 14px; margin-bottom: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; }
.card { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.card img { height: 180px; object-fit: cover; width: 100%; }
.card .card-body { padding: 16px 18px; }
.card h3 { font-size: 17px; margin: 0 0 8px; }
.card .meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); }

.quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 32px 0; }
.quicklinks a { display: block; background: var(--bg-soft); border-left: 4px solid var(--green); padding: 16px 18px; font-weight: 600; }
.quicklinks a:hover { border-left-color: var(--orange); background: #f1efe9; }

/* Homepage: two-column intro (The Party / News and Events) */
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-bottom: 10px; }
.home-cols h2 { font-size: 24px; margin: 0 0 8px; }
.home-cols .underline { width: 50px; height: 4px; background: var(--orange); margin-bottom: 18px; }
.home-cols img { border-radius: 4px; margin-bottom: 16px; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.news-list img { width: 90px; height: 68px; object-fit: cover; border-radius: 4px; flex-shrink: 0; margin: 0; }
.news-list h4 { margin: 0 0 4px; font-size: 15px; line-height: 1.35; }
.news-list .meta { color: var(--muted); font-size: 12px; }
.more-link { display: inline-block; margin-top: 16px; font-weight: 600; }

/* CTA bands */
.cta-band {
  background: var(--green) url('../photos/section-bg.jpg') repeat; background-blend-mode: multiply;
  color: #fff; text-align: center; padding: 56px 20px; margin: 56px 0;
}
.cta-band h2 { color: #fff; font-size: 28px; margin: 0 0 22px; }
.cta-band .btn-orange { font-size: 16px; }

/* Core Pillars */
.pillars-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.pillars-grid figure { margin: 0; text-align: center; }
.pillars-grid img { border-radius: 4px; height: 140px; object-fit: cover; width: 100%; margin-bottom: 10px; }
.pillars-grid figcaption { font-weight: 700; }

@media (max-width: 900px) {
  .home-cols { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}

article.content p { margin: 0 0 18px; }
article.content img { border-radius: 4px; margin: 10px 0; }
article.content ul, article.content ol { margin: 0 0 18px; padding-left: 22px; }
article.content li { margin-bottom: 8px; }
table.content-table { border-collapse: collapse; width: 100%; margin: 0 0 24px; font-size: 15px; }
table.content-table td, table.content-table th { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
table.content-table tr:nth-child(even) { background: var(--bg-soft); }

.post-meta { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.back-link { display: inline-block; margin-bottom: 24px; font-weight: 600; }

/* Registration form */
.reg-form { max-width: 640px; margin: 20px 0; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 30px; }
.reg-form .form-row { margin-bottom: 18px; }
.reg-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.reg-form .opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.reg-form input[type="text"], .reg-form input[type="email"], .reg-form input[type="tel"], .reg-form input[type="file"] {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 15px; font-family: inherit; background: #fff;
}
.reg-form input[type="text"]:focus, .reg-form input[type="email"]:focus, .reg-form input[type="tel"]:focus {
  outline: none; border-color: var(--green);
}
.reg-form .form-check label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.reg-form .form-check input { width: 18px; height: 18px; }
.reg-form button.btn { border: none; cursor: pointer; font-size: 16px; }
.reg-note { max-width: 640px; color: var(--muted); font-size: 14px; }

/* Footer */
footer.site-footer { background: #232323; color: #ccc; padding: 40px 0 20px; margin-top: 40px; }
footer.site-footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
footer.site-footer h4 { color: var(--orange); font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 14px; border-bottom: 2px solid var(--orange); display: inline-block; padding-bottom: 6px; }
footer.site-footer a { color: #ccc; }
footer.site-footer a:hover { color: var(--orange); }
footer.site-footer ul { list-style: none; margin: 0; padding: 0; }
footer.site-footer li { margin-bottom: 8px; }
.footer-bottom { text-align: center; padding-top: 24px; margin-top: 24px; border-top: 1px solid #3a3a3a; font-size: 13px; color: #888; }

@media (max-width: 860px) {
  nav.mainnav .wrap { padding: 0; }
  nav.mainnav ul.nav-top { display: none; flex-direction: column; width: 100%; }
  nav.mainnav.open ul.nav-top { display: flex; }
  nav.mainnav ul.nav-top > li { flex: none; }
  nav.mainnav ul.nav-top > li > a { text-align: left; }
  nav.mainnav ul ul { position: static; box-shadow: none; display: block; border: none; }
  nav.mainnav li.has-children:hover > ul { display: block; }
  .nav-toggle {
    display: block; width: 100%; text-align: left; background: var(--green); color: #fff;
    border: none; padding: 14px 18px; font-size: 16px; font-weight: 600; cursor: pointer;
  }
  .hero { height: 380px; }
  .hero .slide img { height: 380px; }
  .hero-caption h1 { font-size: 26px; }
  .hero-nav { width: 36px; height: 36px; font-size: 18px; }
  .site-header .wrap { flex-wrap: wrap; gap: 10px; }
  .brand img { height: 52px; }
  .topbar .wrap { font-size: 12px; }
}

#toTop {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--green); color: #fff; font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#toTop:hover { background: var(--orange); }

#whatsappBtn {
  position: fixed; left: 22px; bottom: 22px; z-index: 50;
  width: 64px; height: 64px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}
#whatsappBtn svg { width: 36px; height: 36px; }
#whatsappBtn:hover { background: #1ebe5b; transform: scale(1.06); }

@media (max-width: 860px) {
  #whatsappBtn { left: 16px; bottom: 16px; width: 54px; height: 54px; }
  #whatsappBtn svg { width: 30px; height: 30px; }
  #toTop { right: 16px; bottom: 20px; }
}
