:root {
  --green: #1f7a3d;
  --green-dark: #13562a;
  --green-light: #eaf7ee;
  --white: #ffffff;
  --text: #233127;
  --muted: #647069;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7fcf8 0%, #ffffff 100%);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100%;
}

main {
  padding-bottom: 3rem;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 0 1.5rem;
  position: relative;
  width: 100%;
  z-index: 10;
  background: transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 4px;
}

.brand span {
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-links a[aria-current="page"] {
  font-weight: 700;
}

.hero {
  background: linear-gradient(135deg, #13562a, #1f7a3d);
  min-height: 100vh;
  padding: 0 2rem 2.5rem;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/images/hero-bg.svg') no-repeat center bottom / cover;
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(19, 86, 42, 0.3), rgba(31, 122, 61, 0.2));
  pointer-events: none;
  z-index: 1;
}

.navbar,
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.75rem;
  align-items: center;
  max-width: 1280px;
  margin: auto;
  width: 100%;
  flex: 1;
}

.hero-copy {
  color: var(--white);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d7f3df;
  margin-bottom: 0.8rem;
}

.section .eyebrow {
  color: var(--green);
  font-weight: 700;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.hero-copy p {
  color: #effbf0;
  max-width: 580px;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  background: var(--white);
  color: var(--green-dark);
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.slideshow {
  position: relative;
  min-height: 500px;
  width: 100%;
  max-width: 640px;
  justify-self: end;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.timeline-widget {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: min(360px, calc(100% - 2rem));
  max-height: calc(100vh - 3rem);
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(31, 122, 61, 0.18);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.timeline-toggle {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  border: none;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.timeline-menu {
  display: flex;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: rgba(31, 122, 61, 0.06);
}

.timeline-item {
  flex: 1 1 auto;
  min-width: 110px;
  border: none;
  background: transparent;
  color: var(--green-dark);
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.timeline-item.active,
.timeline-item:hover {
  background: var(--green);
  color: var(--white);
}

.timeline-panel {
  padding: 1rem 1.2rem 1.3rem;
  overflow-y: auto;
  min-height: 220px;
}

.timeline-card {
  display: none;
  color: var(--text);
}

.timeline-card.active {
  display: block;
}

.timeline-card h3,
.timeline-card h4 {
  color: var(--green-dark);
  margin-top: 1rem;
}

.timeline-widget.collapsed .timeline-menu,
.timeline-widget.collapsed .timeline-panel {
  display: none;
}

.timeline-widget.collapsed {
  max-height: none;
  width: min(360px, calc(100% - 2rem));
}

.timeline-card p,
.timeline-card ul {
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.5;
}

.timeline-card ul {
  padding-left: 1.2rem;
}

.timeline-card li {
  margin-bottom: 0.4rem;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.slide.active {
  opacity: 1;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  color: var(--green-dark);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.prev { left: 14px; }
.next { right: 14px; }

.section {
  max-width: 1120px;
  margin: 1.25rem auto 0;
  padding: 2.25rem 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(234,247,238,0.95));
  box-shadow: 0 10px 30px rgba(19, 86, 42, 0.05);
  position: relative;
  overflow: hidden;
}

.alt-section {
  background: linear-gradient(135deg, #f4fcf5 0%, #ffffff 100%);
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  margin-bottom: 0.45rem;
  color: var(--green-dark);
}

.section-body-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}

.section-body-row p {
  flex: 1;
}

.section p {
  color: var(--muted);
  max-width: 780px;
  font-size: 1rem;
}

.section-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.section-copy {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.section-panel {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 122, 61, 0.08);
  border-radius: 18px;
  padding: 1rem 1.2rem;
}

.section-panel h3 {
  color: var(--green-dark);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.section-panel p {
  color: var(--muted);
  font-size: 0.95rem;
}

.section-link-wrapper {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-link-wrapper:hover {
  transform: translateY(-2px);
}

.page-main {
  padding: 3rem 1.5rem 4rem;
}

.page-section {
  max-width: 850px;
  margin: 0 auto;
  background: linear-gradient(135deg, #ffffff 0%, #f4fcf5 100%);
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: 0 10px 30px rgba(19, 86, 42, 0.06);
}

.page-section h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--green-dark);
  margin-bottom: 0.8rem;
}

.page-section p {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.service-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.service-card {
  background: linear-gradient(135deg, #ffffff 0%, #f4fcf5 100%);
  padding: 1.35rem;
  border-radius: 18px;
  border: 1px solid #dcefe2;
  box-shadow: 0 8px 22px rgba(19, 86, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.service-card-link:hover .service-card {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(19, 86, 42, 0.12);
}

.service-card h3 {
  color: var(--green-dark);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-card h3::before {
  content: '✦';
  color: var(--green);
  font-size: 0.9rem;
}

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #f7fcf8, #ffffff);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.faq-item {
  border: 1px solid rgba(31, 122, 61, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 6px 20px rgba(19, 86, 42, 0.08);
  border-color: rgba(31, 122, 61, 0.2);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(31, 122, 61, 0.04);
}

.faq-question[aria-expanded="true"] {
  background: linear-gradient(90deg, rgba(31, 122, 61, 0.07), rgba(31, 122, 61, 0.03));
}

.faq-question span:first-child {
  flex: 1;
}

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(31, 122, 61, 0.1);
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 600;
  transition: transform 0.3s ease, background 0.2s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  background: var(--green);
  color: var(--white);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: linear-gradient(180deg, rgba(234, 247, 238, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
}

.faq-answer p {
  padding: 0;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.8;
  text-align: left;
  width: 100%;
}

.faq-answer strong {
  color: var(--green-dark);
}

.faq-question[aria-expanded="true"] + .faq-answer {
  max-height: 900px;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid rgba(31, 122, 61, 0.08);
}

/* Chatbot Design */
.chatbot-card {
  max-width: 520px;
  margin: 1.2rem auto 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(31, 122, 61, 0.1);
  background: var(--white);
  box-shadow: 0 12px 40px rgba(19, 86, 42, 0.08);
}

.chat-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.chat-avatar::after {
  content: '🤖';
  font-size: 1.2rem;
}

.chat-agent-name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-status {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  position: relative;
  padding-left: 12px;
}

.chat-status::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chat-messages {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 380px;
  overflow-y: auto;
  background: #fafcfa;
}

.chat-msg {
  display: flex;
  max-width: 90%;
}

.chat-msg-bot {
  align-self: flex-start;
}

.chat-msg-user {
  align-self: flex-end;
}

.msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  word-wrap: break-word;
}

.chat-msg-bot .msg-bubble {
  background: var(--white);
  border: 1px solid rgba(31, 122, 61, 0.08);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg-user .msg-bubble {
  background: linear-gradient(135deg, #155d31, #0f4a26);
  color: #e2f7e8;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.result-header {
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.result-separator {
  border: none;
  border-top: 1px dashed rgba(31, 122, 61, 0.2);
  margin: 0.4rem 0;
}

.result-chunk {
  padding: 0.3rem 0;
  color: var(--text);
  line-height: 1.7;
}

.result-chunk:not(:last-child) {
  border-bottom: 1px solid rgba(31, 122, 61, 0.06);
  padding-bottom: 0.6rem;
  margin-bottom: 0.2rem;
}

.result-footer {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.result-footer a {
  color: var(--green-dark);
  text-decoration: underline;
  font-style: normal;
  font-weight: 600;
}

/* Confidence indicator */
.result-confidence {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.3rem 0;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
}

.confidence-high {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.confidence-medium {
  background: rgba(234, 179, 8, 0.12);
  color: #a16207;
}

.confidence-low {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

/* Answer sentences */
.result-answer {
  margin: 0.2rem 0;
}

.result-answer p {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  color: var(--text);
  font-size: 0.9rem;
}

.result-answer p:last-child {
  margin-bottom: 0;
}

.result-answer strong {
  color: var(--green-dark);
  font-weight: 700;
}

/* List-formatted text within answers */
.result-answer p {
  white-space: normal;
}

.result-answer p br + strong {
  display: inline-block;
  margin-top: 0.3rem;
}

/* Related questions & topic chips */
.result-related,
.result-suggestions {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
}

.related-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topic-chip,
.related-q {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(31, 122, 61, 0.25);
  background: rgba(31, 122, 61, 0.05);
  color: var(--green-dark);
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
  text-align: left;
}

.topic-chip:hover,
.related-q:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  transform: translateY(-1px);
}

.related-q {
  display: block;
  width: 100%;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
}

.related-q:last-child {
  margin-bottom: 0;
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  background: var(--white);
  border-top: 1px solid rgba(31, 122, 61, 0.08);
}

.chat-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(31, 122, 61, 0.12);
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #f8fbf9;
}

.chat-input:focus {
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(31, 122, 61, 0.08);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(31, 122, 61, 0.3);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 860px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .slideshow {
    min-height: 340px;
    max-width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 1rem 0 0.5rem;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .hero {
    padding: 4.5rem 1rem 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .chatbot-card {
    max-width: 100%;
  }

  .chat-messages {
    max-height: 260px;
  }
}
