/* ========== GLOBAL (ZAMBIA THEME) ========== */
:root {
  --nav-h: 84px;

  /* Zambia flag palette */
  --zm-green:  #198754;  /* rich green (primary) */
  --zm-red:    #d7262d;  /* strong red (accent) */
  --zm-black:  #111111;  /* near-black */
  --zm-orange: #f28c28;  /* orange accent */
  --zm-copper: #b87333;  /* optional "copper" accent */

  /* Tints/Shades for UI */
  --bg: #f6f7f9;
  --card: #ffffff;
  --muted: #667085;
  --border: #e6e6e6;

  /* ✅ Aliases for admin UI (so your admin-form CSS works) */
  --bg-elev: var(--card);
  --border-mid: var(--border);
  --brand-800: var(--primary);

  --green-50:  #eaf6f0;
  --green-100: #d7f0e3;
  --green-200: #bfe6d2;
  --green-600: #157347;  /* hover shade */
  --green-700: #0f5f3a;

  --red-50:  #fff1f2;
  --red-100: #ffe4e6;
  --red-600: #b91c1c;

  --orange-50:  #fff7ed;
  --orange-100: #ffedd5;
  --orange-600: #ea580c;

  --shadow-1: 0 2px 6px rgba(0,0,0,.08);
  --shadow-2: 0 4px 12px rgba(0,0,0,.10);
  --shadow-3: 0 6px 18px rgba(0,0,0,.12);

  /* Typography */
  --font: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  /* Primary accents */
  --primary: var(--zm-green);
  --primary-ink: #ffffff;
  --primary-hover: var(--green-600);

  /* Secondary accents */
  --accent: var(--zm-red);
  --accent-ink: #ffffff;
  --accent-hover: var(--red-600);

  /* Optional highlight (for badges/tags/warnings) */
  --highlight: var(--zm-orange);
  --highlight-hover: var(--orange-600);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: var(--nav-h) 0 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--zm-black);
}

/* ========== NAVBAR (responsive) ========== */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto auto; /* title | toggle | menu */
  align-items: center;
  gap: 12px;
  background: var(--primary);          /* Zambia green */
  padding: 12px 16px;
  color: var(--primary-ink);
  min-height: var(--nav-h);
}

/* Subtle Zambia flag stripe under the navbar */
.navbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 6px;
  background: linear-gradient(
    to right,
    var(--zm-green) 0%,
    var(--zm-green) 55%,
    var(--zm-red) 55%,
    var(--zm-red) 72%,
    var(--zm-black) 72%,
    var(--zm-black) 88%,
    var(--zm-orange) 88%,
    var(--zm-orange) 100%
  );
}

/* Brand link (logo + text) */
.nav-left .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary-ink);
}

.navbar .brand-text {
  color: var(--primary-ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: clamp(1rem, 2.8vw, 1.5rem);
  line-height: 1.1;
  white-space: nowrap;
}

/* Optional: subtle hover/focus without changing color */
.nav-left .brand:hover .brand-text,
.nav-left .brand:focus .brand-text {
  color: var(--primary-ink);
  text-decoration: none;
}

/* Accessible focus outline */
.nav-left .brand:focus-visible {
  outline: 2px solid rgba(255,255,255,.75);
  outline-offset: 3px;
}

/* Logo (inside brand link) */
.nav-left .brand .logo,
.logo {
  height: clamp(36px, 7vw, 60px);
  width: clamp(36px, 7vw, 60px);
  border-radius: 50%;
  object-fit: cover;

  /* Zambia-style ring */
  outline: 2px solid rgba(255,255,255,.9);
  outline-offset: 2px;
}

/* mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  color: var(--primary-ink);
  border: 2px solid var(--highlight); /* Zambia orange accent */
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--accent);        /* red on hover */
}

/* menu */
.nav-right {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
  align-items: center;
}

.nav-link,
.nav-logout {
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 6px 0;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
  font-size: 0.98rem;
}

.nav-link:hover,
.nav-logout:hover {
  color: #ffffff;
  opacity: .92;
}

/* navbar → mobile behavior */
@media (max-width: 900px) {
  .navbar { grid-template-columns: 1fr auto; }
  .nav-toggle { display: inline-block; }

  .nav-right {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;

    background: var(--zm-green);
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255,255,255,0.12);

    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }

  .nav-right.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link,
  .nav-logout {
    padding: 10px 8px;
    border-radius: 10px;
    background: rgba(0,0,0,0.12);   /* subtle contrast on green */
    text-align: center;
  }
}

/* ========== HERO — ZAMBIA THEME ========== */
.hero {
  scroll-margin-top: calc(var(--nav-h) + 12px);
  position: relative;
  min-height: 72vh;
  display: grid;
  place-items: center;
  margin: 0 0 25px;
  background: var(--zm-green);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/static/images/national-assembly.jpg");
  background-size: cover;
  background-position: center;
  filter: brightness(0.55) saturate(1.08) contrast(1.08);
  transform: scale(1.02);
}

/* Zambia ribbon overlay */
.hero::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  top: 12%;
  height: 14px;
  transform: rotate(-2deg);
  background: linear-gradient(
    to right,
    var(--zm-green) 0%,
    var(--zm-green) 58%,
    var(--zm-red) 58%,
    var(--zm-red) 74%,
    var(--zm-black) 74%,
    var(--zm-black) 90%,
    var(--zm-orange) 90%,
    var(--zm-orange) 100%
  );
  opacity: 0.9;
  mix-blend-mode: overlay;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 60% at 50% 50%,
      rgba(0,0,0,0.06) 0%,
      rgba(0,0,0,0.52) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  padding: 48px 20px;
  color: var(--primary-ink);
  text-align: center;
}

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: .4px;
  line-height: 1.08;
  text-shadow: 0 1px 0 rgba(0,0,0,.25), 0 6px 22px rgba(0,0,0,.42);
}

.hero-title-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid rgba(255,255,255,.85);
  animation: typewrite 5s steps(30, end) .5s infinite alternate, blink .8s step-end infinite;
}

.hero-subtitle {
  color: rgba(255,255,255,.88);
}

@keyframes typewrite { from { width: 0; } to { width: 27ch; } }
@keyframes typewriteShort { from { width: 0; } to { width: 22ch; } }
@keyframes blink { 50% { border-color: transparent; } }

@media (max-width: 620px) {
  .hero { min-height: 62vh; }
}

@media (max-width: 480px) {
  .hero-title-text {
    white-space: nowrap;
    border-right: 2px solid rgba(255,255,255,.85);
    animation: typewriteShort 5s steps(24, end) .5s infinite alternate, blink .8s step-end infinite;
  }
  .hero-subtitle { font-size: .95rem; }
}

.hero-cta .btn,
.hero-cta .btn-primary {
  padding: 12px 14px;
  border-radius: 10px;
}

/* overview panel on hero */
.hero-overview {
  margin: 0 auto;
  max-width: 900px;
  background: rgba(0,0,0,.16);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: left;
}

.hero-intro-card {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  max-width: 720px;
}

.hero-intro-card h3 { margin: 0 0 6px 0; }

.hero-overview h3 {
  margin: 0 0 8px;
  color: rgba(255,255,255,.95);
}

.hero-overview p {
  margin: 0;
  color: rgba(255,255,255,.88);
  line-height: 1.5;
  font-size: .98rem;
}

/* ========== LAYOUT CONTAINERS & SECTIONS ========== */
.page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.section {
  background: #fff;
  border-radius: 12px;
  padding: clamp(18px, 2.5vw, 25px);
  margin: clamp(12px, 2.5vw, 25px) 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.section h2, .section h3 { color: #1b4332; }
.section ul { list-style: none; padding: 0; }
.section ul li {
  margin: 12px 0; padding: 12px;
  border-left: 4px solid #2d6a4f;
  background: #f9fafa; border-radius: 6px;
}
@media (max-width: 480px) {
  .page-container { padding: 0 12px; }
  .section { padding: 16px; }
}

/* ========== HEADER / GRID / KPI ========== */
.about-header {
  display: flex; justify-content: space-between; align-items: start;
  gap: 16px; margin-bottom: 12px;
}
.badge {
  background: #e8f5e9; color: #1b4332;
  border: 1px solid #95d5b2;
  padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.subtle { color: #2b2b2b; }

.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 16px;
}
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-2 { gap: 12px; } }

.card-lite {
  background: #fff; border: 1px solid #e6e6e6;
  border-radius: 10px; padding: 16px;
}

.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin: 18px 0 6px;
}
@media (max-width: 800px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kpi-row { grid-template-columns: 1fr; } }
.kpi {
  background: #fff; border: 1px solid #e6e6e6;
  border-radius: 12px; padding: 14px; text-align: center;
}
.kpi-value { font-size: 1.6em; font-weight: 800; color: #1b4332; line-height: 1.1; }
.kpi-label { color: #555; font-size: .9em; margin-top: 4px; }

/* ========== BUTTONS / CTAs ========== */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.btn {
  display: inline-block;
  background: #fff; color: #1b4332;
  border: 2px solid #2d6a4f;
  padding: 10px 14px; border-radius: 10px;
  text-decoration: none; font-weight: 700;
  transition: all .2s ease;
}
.btn:hover { background: #e8f5e9; border-color: #40916c; }
.btn-primary {
  background: #2d6a4f; color: #fff; border-color: #2d6a4f;
}
.btn-primary:hover { background: #40916c; border-color: #40916c; }
@media (max-width: 560px) {
  .cta-row { flex-direction: column; }
  .btn, .btn-primary { width: 100%; text-align: center; }
}

/* ========== TOP HEADER (optional banner) ========== */
.top-header {
  text-align: center; background: #2d6a4f; color: #fff;
  padding: 40px 20px; border-bottom: 4px solid #40916c;
}
.top-header h2 { margin: 0; font-size: 1.8em; }
.top-header p { margin-top: 10px; font-size: 1.1em; color: #d8f3dc; }

/* ========== FORMS ========== */
form { display: flex; flex-direction: column; gap: 12px; }
input[type="file"], input[type="text"], input[type="password"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 12px; border: 2px solid #2d6a4f; border-radius: 8px; font-size: 1rem; background: #fff; color: #000;
}


button {
  background: #2d6a4f; color: #fff; border: none;
  padding: 12px 18px; border-radius: 10px;
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: background .2s ease-in-out;
}
button:hover { background: #40916c; }
pre {
  background: #f1f3f5; border-radius: 8px; padding: 15px;
  font-size: .9em; overflow-x: auto; border: 1px solid #ccc;
}

/* ========== NEWS ========== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin-top: 20px;
}
.news-card {
  background: #fff; border: 1px solid #ddd; border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  padding: 15px; text-align: left; transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,.12); }
.news-card img {
  width: 100%; height: 160px; object-fit: cover;
  border-radius: 8px; margin-bottom: 10px;
}
.news-card h3 { margin: 10px 0; font-size: 1.1em; color: #1b4332; }
.news-card small { display: block; color: #666; margin-bottom: 8px; }
.news-card p { font-size: .9em; color: #333; margin-bottom: 12px; }
.news-card a { text-decoration: none; color: #2d6a4f; font-weight: bold; }
.news-card a:hover { text-decoration: underline; }

/* ========== CAROUSEL ========== */
.carousel-container { position: relative; display: flex; align-items: center; }
.carousel {
  display: flex; overflow-x: auto; scroll-behavior: smooth;
  gap: 20px; padding: 10px; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-card {
  flex: 0 0 280px; background: #fff; border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.1); text-align: center;
  padding: 15px; text-decoration: none; color: #333;
  transition: transform .3s, box-shadow .3s;
}
.carousel-card:hover { transform: translateY(-5px); box-shadow: 0 6px 14px rgba(0,0,0,.15); }
.carousel-card img {
  width: 100%; height: 160px; object-fit: contain;
  border-radius: 8px; margin-bottom: 12px; background: #f8f9fa;
}
.carousel-card h3 { color: #1b4332; margin: 10px 0; }
.carousel-card p { font-size: .9em; color: #444; }
.carousel-btn {
  background: #2d6a4f; color: #fff; border: 0;
  padding: 10px 14px; border-radius: 50%; cursor: pointer; font-size: 1.2em;
  margin: 0 5px; transition: background .3s;
}
.carousel-btn:hover { background: #40916c; }
@media (max-width: 600px) {
  .carousel-card { flex-basis: 82vw; }
  .carousel-btn { padding: 8px 10px; font-size: 1rem; }
}

/* ========== LINKS / BUTTONS (GIS M&E) ========== */
/* Use this class on your <a> links: class="btn-link" */
.btn-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(27, 67, 50, 0.22);
  background: #1b4332;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .2px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  box-shadow: 0 6px 18px rgba(27, 67, 50, 0.16);
  cursor: pointer;
  user-select: none;
}

.btn-link:hover{
  background: #163828;
  border-color: rgba(27, 67, 50, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(27, 67, 50, 0.20);
}

.btn-link:active{
  transform: translateY(0);
  box-shadow: 0 5px 14px rgba(27, 67, 50, 0.14);
}

.btn-link:focus-visible{
  outline: 3px solid rgba(27, 67, 50, 0.28);
  outline-offset: 2px;
}

/* Admin setup link variant (smaller, more subtle) */
.btn-link--subtle{
  padding: 8px 12px;
  font-size: 12px;
  background: #f6fbf8;
  color: #1b4332;
  border: 1px solid rgba(27, 67, 50, 0.25);
  box-shadow: none;
}

.btn-link--subtle:hover{
  background: #eaf6ef;
  color: #163828;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

/* Optional: icon sizing if you later add SVG icons inside buttons */
.btn-link svg{
  width: 16px;
  height: 16px;
}

/* ========== PROJECT CARD ACTION ROW ========== */
.project-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* ========== OPTIONAL: make project details spacing cleaner ========== */
.project-details p{
  margin: 6px 0;
  color: #2f3b35;
}

.project-details small{
  display: inline-block;
  margin-top: 6px;
  opacity: 0.9;
}

/* ========== MOBILE TUNING ========== */
@media (max-width: 560px){
  .btn-link{
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
  }
  .btn-link--subtle{
    width: 100%;
  }
}

/* ========== PROJECTS ========== */
.projects-container {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px; margin-top: 20px;
}
.project-card {
  background: #fff; border: 1px solid #ddd; border-radius: 12px;
  overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,.1);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.project-img {
  width: 100%; height: 200px; object-fit: contain; background: #f8f9fa;
}
.project-details { padding: 15px; font-size: 14px; flex: 1; }
.project-details h3 { margin: 10px 0; color: #1b4332; }
.project-map { height: 250px; width: 100%; border-top: 1px solid #eee; }
.project-map--empty{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8f9fa;
  color:#6c757d;
  font-size:12px;
}

@media (max-width: 560px) {
  .project-img { height: 160px; }
  .project-map { height: 200px; }
}

/* ========== ADMIN FORMS (Professional) ========== */
.admin-form{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-2);
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.admin-form.inline-form{
  padding: 12px;
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
}

.form-grid{
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.small{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px){
  .form-grid.small{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .form-grid, .form-grid.small{ grid-template-columns: 1fr; }
}

/* Make sure admin inputs override the generic form styles */
.admin-form input,
.admin-form textarea,
.admin-form select{
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--zm-black);
  outline: none;
  font-size: 14px;
}

.admin-form textarea{
  min-height: 90px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus{
  border-color: #95d5b2;
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}

.btn-row{
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ✅ Button will ALWAYS be visible */
.admin-form button{
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  cursor: pointer;
  font-weight: 800;
}

.admin-form button:hover{
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}



/* ========== CHATBOT WIDGET ========== */
#chatbot-widget {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
}
#chatbot-toggle {
  background: #007b5e; color: #fff; border: none;
  border-radius: 50%; width: 55px; height: 55px;
  font-size: 22px; cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,.2);
}
.chatbot-box {
  position: fixed; bottom: 80px; right: 20px;
  width: min(360px, 92vw); height: min(520px, 70vh);
  background: #f9f9f9; border: 1px solid #007b5e; border-radius: 12px;
  display: flex; flex-direction: column; box-shadow: 0 6px 12px rgba(0,0,0,.2);
}
.chatbot-box.hidden { display: none; }
@media (max-width: 560px) { .chatbot-box { bottom: 72px; right: 12px; height: 64vh; } }
#chatbot-header {
  background: #007b5e; color: #fff; padding: 10px; font-weight: bold;
  display: flex; justify-content: space-between; align-items: center;
  border-top-left-radius: 12px; border-top-right-radius: 12px;
}
#chatbot-messages {
  flex: 1; overflow-y: auto; padding: 8px; font-size: 14px; background: #fff;
  border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;
}
.chatbot-input { display: flex; gap: 6px; padding: 8px; }
.chatbot-input input { flex: 1; border: 1px solid #ccc; border-radius: 6px; padding: 10px; }
.chatbot-input button { padding: 10px 12px; border-radius: 6px; }
.message.user { text-align: right; color: #007b5e; margin: 4px 0; }
.message.bot { text-align: left; color: #333; margin: 4px 0; }
.message.bot:first-child {
  opacity: 0.95;
}


#chatbot-messages{
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-size: 14px;
  background: #fff;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;

  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message{
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  word-wrap: break-word;
  white-space: pre-wrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.message.user{
  align-self: flex-end;
  background: #e8f5e9;
  border: 1px solid #95d5b2;
  color: #1b4332;
}

.message.bot{
  align-self: flex-start;
  background: #f4f6f8;
  border: 1px solid #e3e7ee;
  color: #1f2937;
}


/* ========== SURVEY ========== */
.survey-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 15px 30px; margin-bottom: 20px;
}
.survey-field { display: flex; flex-direction: column; gap: 5px; }
.survey-input {
  padding: 5px; font-size: .9em; width: 60px; min-width: 50px; max-width: 200px;
  transition: width .2s ease;
}
.survey-input:focus { outline: 2px solid #40916c; }
.survey-input:not(:placeholder-shown) { width: auto; }
.survey-btn {
  grid-column: span 2; padding: 10px 15px; background: #1b4332; color: #fff;
  border: none; border-radius: 5px; cursor: pointer;
}
.survey-btn:hover { background: #2d6a4f; }

/* ========== SLIDESHOW (home content) ========== */
#slideshow { position: relative; max-width: 700px; margin: auto; }
.slide { display: none; text-align: center; }
.slide.active { display: block; }
.slide img {
  width: 100%; height: 350px; object-fit: cover; border-radius: 10px; margin-bottom: 10px;
}
.slideshow-controls { text-align: center; margin-top: 10px; }
.slideshow-controls button { margin: 5px; }

/* ========== FOOTER ========== */
.footer {
  background: #1b4332; color: #fff;
  padding: 30px 20px;
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0));
  text-align: center; font-size: .9em;
}
.footer a { color: #95d5b2; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ========== FLASH MESSAGES ========== */
.flash { padding: 10px; margin: 10px 0; border-radius: 6px; font-weight: bold; }
.flash.success { background: #d4edda; color: #155724; }
.flash.error { background: #f8d7da; color: #721c24; }

/* ========== DOCS GRID & TABLES ========== */
.docs-grid {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 20px;
}
.doc-card {
  background: #f8f9fa; border: 2px solid #ddd; border-radius: 12px;
  padding: 20px; width: 250px; text-align: center; text-decoration: none; color: #333;
  transition: all .3s ease; box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.doc-card:hover {
  border-color: #2e7d32; background: #e8f5e9; transform: translateY(-5px); color: #2e7d32;
}
.doc-card .icon { font-size: 40px; margin-bottom: 10px; }
.doc-card h3 { margin: 10px 0; font-size: 18px; font-weight: bold; }

.table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: 10px; border: 1px solid #e6e6e6; background: #fff;
}
.doc-table {
  width: 100%; border-collapse: collapse; margin: 0;
  background: #fff;
}
.table-wrap .doc-table { min-width: 640px; }
.doc-table th, .doc-table td {
  padding: 12px 14px; border-bottom: 1px solid #eee; vertical-align: top;
}
.doc-table thead th {
  background: #f4f7f5; color: #1b4332; text-align: left; font-weight: 700;
}
.doc-table tbody tr:hover { background: #f9fafa; }
.doc-table a { color: #1b4332; text-decoration: none; font-weight: 600; }
.doc-table a:hover { text-decoration: underline; }

/* ========== ATLAS CARDS ========== */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.atlas-card {
  display: grid; grid-template-columns: 1fr; background: #fff;
  border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.06); overflow: hidden;
}
.atlas-thumb { width: 100%; height: 180px; object-fit: cover; display: block; }
.atlas-content { padding: 14px 16px 16px; }
.atlas-title { margin: 4px 0 8px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tag { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: #eef3ff; border: 1px solid #dbe5ff; }
.credit { color: #666; display: block; margin-bottom: 8px; }
.atlas-points { margin: 8px 0 14px; padding-left: 18px; }
.atlas-points li { margin: 4px 0; }
.atlas-cta-row { display: flex; gap: 12px; align-items: center; }
.text-link { text-decoration: underline; font-size: .95rem; }

/* ========== AUTH (Login / Signup / OTP) ========== */
.auth-split {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

/* Left column (form) */
.auth-left {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 3.5vw, 44px);
  background: #fff;
}
.auth-card {
  width: min(520px, 100%);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.auth-brand img {
  width: 150px;
  height: 150px;
  object-fit: contain;
}
.auth-title {
  margin: 0 0 6px 0;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.1;
  color: #0b2b1f;
  font-weight: 800;
}
.auth-subtitle {
  margin: 0 0 18px 0;
  color: #4a4a4a;
}

/* Form fields in auth */
.auth-card form {
  display: grid;
  gap: 12px;
}
.auth-card label {
  font-weight: 700;
  font-size: .95rem;
  color: #173d2e;
}
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"],
.auth-card input[type="tel"],
.auth-card select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #2d6a4f;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
}
.auth-card input:focus,
.auth-card select:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45,106,79,.15);
}
.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 6px;
}
.form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  color: #2b2b2b;
  font-size: .95rem;
}
.auth-btn {
  width: 100%;
  background: #2d6a4f;
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s ease-in-out;
}
.auth-btn:hover { background: #40916c; }

.auth-alt {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 6px;
  color: #666;
}
.auth-alt::before,
.auth-alt::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

/* Right column (photo) */
.auth-right {
  position: relative;
  min-height: 520px;
  background-image: url("/static/images/Parliament.jpg"); /* <- your image */
  background-size: cover;
  background-position: center;
}
.auth-right::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 70% 50%, rgba(0,0,0,.05) 0%, rgba(0,0,0,.45) 100%);
}
.auth-caption {
  position: absolute;
  right: clamp(12px, 3vw, 24px);
  bottom: clamp(12px, 3vw, 24px);
  left: clamp(12px, 3vw, 24px);
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: clamp(10px, 2vw, 16px);
  font-size: clamp(16px, 2.3vw, 22px);
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,.3);
}

/* Smaller screens: stack */
@media (max-width: 980px) {
  .auth-split {
    grid-template-columns: 1fr;
  }
  .auth-right { order: -1; height: 38vh; min-height: 320px; }
}

/* Links inside auth */
.auth-link { color: #2d6a4f; font-weight: 700; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-helper { color: #666; margin-top: 8px; font-size: .95rem; }

/* ========== CALENDAR (FullCalendar + Zambia UI) ========== */
.calendar-page .calendar-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.calendar-page .calendar-title{
  margin:0;
  color:#1b4332;
  font-weight:900;
  letter-spacing:.2px;
}

.calendar-page .calendar-subtitle{
  margin:6px 0 0;
  color:var(--muted);
  max-width: 70ch;
}

.calendar-page .calendar{
  margin-top:14px;
}

/* FullCalendar theming */
.fc{
  font-family: var(--font);
}

.fc .fc-toolbar-title{
  color:#1b4332;
  font-weight:900;
  letter-spacing:.3px;
}

.fc .fc-button{
  border-radius:10px !important;
  border: 1px solid var(--border) !important;
  background: #fff !important;
  color: #1b4332 !important;
  font-weight: 800 !important;
  padding: 8px 10px !important;
  box-shadow: var(--shadow-1);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.fc .fc-button:hover{
  background: var(--green-50) !important;
  border-color: #95d5b2 !important;
  transform: translateY(-1px);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active{
  background: var(--primary) !important;
  color: var(--primary-ink) !important;
  border-color: var(--primary) !important;
}

.fc .fc-daygrid-day-frame{
  border-radius: 10px;
}

.fc .fc-daygrid-day.fc-day-today{
  background: var(--green-50) !important;
}

.fc .fc-event{
  border-radius: 10px !important;
  border: none !important;
  padding: 2px 6px !important;
  box-shadow: var(--shadow-1);
  font-weight: 700;
}

.fc .fc-event .fc-event-title{
  font-weight: 800;
}

.fc .fc-daygrid-event-dot{
  display:none;
}

/* ========== MODALS (Calendar Add/Edit + Details) ========== */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}

.modal-backdrop.show{
  display: flex;
}

.modal{
  width: min(720px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0,0,0,0.2);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}

.modal-header{
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background: #f9fafb;
}

.modal-title{
  margin:0;
  font-size: 16px;
  font-weight: 900;
  color:#111827;
}

.modal-body{
  padding: 16px;
}

.modal-footer{
  padding: 14px 16px;
  border-top: 1px solid #eee;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  background:#fafafa;
}

/* ========== FORM UI (Calendar Modals) ========== */
.grid{
  display:grid;
  gap:12px;
}

.grid-2{
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 760px){
  .grid-2{ grid-template-columns: 1fr; }
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.field label{
  font-size: 12px;
  color:#374151;
  font-weight: 800;
}

.label-inline{
  margin:0;
  font-size: 14px;
  font-weight: 800;
  color:#111827;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
}

.muted{
  color:#6b7280;
  font-size: 12px;
}

.prewrap{
  white-space: pre-wrap;
}

/* Inputs in calendar modal: match your form style but softer borders */
.modal input,
.modal select,
.modal textarea{
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 10px;
  font-size: 14px;
  outline:none;
  background:#fff;
  color:#111;
}

.modal textarea{
  min-height: 90px;
  resize: vertical;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus{
  border-color: #95d5b2;
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}

/* ========== BUTTONS (Calendar Modals) ========== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  cursor: pointer;
  background: #fff;
  color: #111827;
  font-weight: 800;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
}

.btn:hover{
  background: #f9fafb;
  border-color:#cfd4dc;
  transform: translateY(-1px);
}

.btn-primary{
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}

.btn-primary:hover{
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-danger{
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-danger:hover{
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost{
  background: #fff;
  color:#111827;
}

/* ========== DETAILS UI ========== */
.chips{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.pill{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  font-size:12px;
  color:#111827;
  font-weight: 800;
}

.details-title{
  margin:12px 0 8px;
  font-size:18px;
  font-weight: 900;
  color:#111827;
}

/* ========== ACCESSIBILITY / PREFERENCES ========== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
