:root {
  --primary-accent: #9eeb47;
  --primary-accent-hover: #a0d970;
  --bg-dark: #152215;
  --bg-section: rgba(137, 199, 88, 0.1);
  --bg-section-hover: rgba(137, 199, 88, 0.15);
  --bg-footer: #334c33;
  --text-light: #f0f0f0;
  --text-dark: #2c3e2c;
  --border-color: rgba(137, 199, 88, 0.2);
  --button-prev-bg: rgba(137, 199, 88, 0.2);
  --button-prev-bg-hover: rgba(137, 199, 88, 0.4);
  --chatbot-bg: #f4f8f4;
  --chatbot-bot-msg-bg: #e9f5e9;
  --chatbot-bot-msg-border: #d4e9d4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light); 
  scroll-behavior: smooth;
  padding-top: 100px;
}

.homebg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9px;
}
.homebg img {
  width: 100%; height: 100%; object-fit: cover;
}

/* ======================================================= */
/* START: CORRECTED Header/Navbar Section for Readability  */
/* ======================================================= */
header {
  position: fixed; top: 0; left: 0; width: 100%; padding: 3px 40px 3px 20px;
  display: flex; justify-content: space-between; align-items: center;
  background-color: transparent; z-index: 1000; transition: all 0.3s ease;
}
header.scrolled {
  background-color: rgba(21, 34, 21, 0.8); 
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); padding: 0px 40px 0px 20px;
}
.logo a img {
  transition: transform 0.3s ease, filter 0.3s ease; height: 80px;
}
.logo a:hover img {
  transform: scale(1.05); filter: brightness(1.2); cursor: pointer;
}
.hamburger { display: none; flex-direction: column; cursor: pointer; z-index: 1001; }
.hamburger div { width: 25px; height: 3px; background-color: white; margin: 4px 0; transition: all 0.3s ease; }
.hamburger.active div:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.hamburger.active div:nth-child(2) { opacity: 0; }
.hamburger.active div:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-right: 30px; }

/* UPDATED: Default link color is now white for high contrast */
nav a {
  color: var(--text-light);
  margin: 0 10px; text-decoration: none; font-weight: bold;
  position: relative; padding: 5px 10px; transition: all 0.3s ease;
}
/* UPDATED: Hover color is now the green accent color */
nav a:not(.active):hover {
  color: var(--primary-accent);
}
/* UPDATED: Underline now matches the green hover color */
nav a:not(.active):after {
  content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
  background-color: var(--primary-accent); transition: width 0.3s ease;
}
nav a:not(.active):hover:after {
  width: 100%;
}
/* This "active" style is correct and remains unchanged */
nav a.active {
  background-color: var(--primary-accent); color: var(--bg-dark);
  padding: 5px 15px; border-radius: 25px; box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
/* ======================================================= */
/* END: CORRECTED Header/Navbar Section                    */
/* ======================================================= */

/* Page Title */
.title h1 {
  color: var(--primary-accent); font-size: 2.8rem; padding: 20px 0;
  text-align: center; width: 100%; font-weight: bold;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3); background-color: transparent; margin-bottom: 20px;
}

/* Main containers */
.container, .insights-container {
  max-width: 1200px; margin: auto; padding: 20px; position: relative;
}

/* --- INSIGHTS LANDING PAGE --- */
.insights-container {
  max-width: 1400px; display: flex; flex-wrap: wrap; justify-content: center; gap: 40px;
}
.insight-card {
  background: var(--bg-section); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color); padding: 40px; border-radius: 15px;
  width: 350px; height: 490px; position: relative; transition: all 0.4s ease;
  opacity: 0; transform: translateY(40px); box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.insight-card:hover {
  transform: translateY(-10px); box-shadow: 0 12px 35px rgba(0,0,0,0.35); background: var(--bg-section-hover);
}
.insight-card .content-wrapper { display: flex; flex-direction: column; align-items: center; height: 100%; }
.insight-card h2 {
  font-size: 1.7rem; margin-bottom: 20px; color: var(--primary-accent); text-align: center;
  width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.insight-card .button {
  position: absolute; bottom: 40px; width: 180px; height: 59px; border-radius: 30px;
  background-color: var(--primary-accent); color: var(--bg-dark);
  font-size: 1.5rem; font-weight: bold; border: none; cursor: pointer; text-align: center;
  line-height: 59px; transition: all 0.3s ease; text-decoration: none; display: block; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.insight-card .button:hover {
  background-color: var(--primary-accent-hover); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.icon img {
  width: 210px; height: 210px; margin: 20px 0; border-radius: 15px;
  transition: all 0.4s ease; box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.icon img:hover {
  transform: scale(1.05); filter: brightness(1.15);
}

/* --- ARTICLE & EVENTS PAGES --- */
.section {
  background: var(--bg-section); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color); padding: 40px; margin-bottom: 30px;
  border-radius: 15px; opacity: 0; transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out; box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  position: relative; overflow: hidden;
}

/* START: CORRECTED SECTION FOR EVENTS PAGE LAYOUT */
.section.section-with-bottom-nav {
  display: flex;
  flex-direction: column;
}
.section-main-content {
  flex-grow: 1; /* Allows this section to fill available space */
}
/* END: CORRECTED SECTION */

.section.visible, .insight-card.visible { opacity: 1; transform: translateY(0); }
.section .content-wrapper { display: flex; flex-wrap: wrap; gap: 40px; color: var(--text-light); }
.left-column, .right-column { flex: 1 1 45%; min-width: 300px; font-size: 1.1rem; line-height: 1.8; }
.left-column p, .right-column p { margin-bottom: 1em; }
.section h2 {
  font-size: 2.5rem; margin-bottom: 10px; color: var(--primary-accent); text-align: left;
  width: 100%; text-shadow: 0 2px 4px rgba(0,0,0,0.3); padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}
.author { text-align: left; font-style: italic; margin-bottom: 25px; color: #c0c0c0; }
.nav-buttons { display: flex; justify-content: space-between; width: 100%; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.nav-button {
  display: inline-flex; align-items: center; justify-content: center; background-color: var(--primary-accent);
  color: var(--bg-dark); padding: 12px 25px; border-radius: 30px; text-decoration: none;
  font-weight: bold; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.2); border: none;
}
.nav-button:hover {
  background-color: var(--primary-accent-hover); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.nav-button i { margin: 0 8px; }
.nav-button.prev { background-color: var(--button-prev-bg); color: var(--primary-accent); }
.nav-button.prev:hover { background-color: var(--button-prev-bg-hover); }
.nav-buttons:has(.nav-button:only-child) { justify-content: center; }

/* --- EVENTS PAGE CAROUSEL --- */
.carousel {
  position: relative; max-width: 1000px; margin: 0 auto;
  background-color: rgba(137, 199, 88, 0.05); border-radius: 15px;
  padding: 20px; text-align: center; overflow: hidden;
}
.carousel-track-container { overflow: hidden; border-radius: 10px; }
.carousel-track { display: flex; transition: transform 0.5s ease-in-out; width: 100%; }
.carousel-slide { min-width: 100%; padding: 0 5px; }
.carousel-slide img {
  width: 100%; max-height: 450px; object-fit: contain;
  border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.carousel-caption { margin-top: 20px; font-size: 1.1rem; color: var(--text-light); line-height: 1.6; padding: 0 20px; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.5rem;
  color: var(--primary-accent); background: rgba(21, 34, 21, 0.5); border: none;
  border-radius: 50%; width: 50px; height: 50px; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.carousel-arrow:hover { background: var(--primary-accent); color: var(--bg-dark); }
.carousel-arrow.left { left: 15px; }
.carousel-arrow.right { right: 15px; }

/* --- FLOATING BUTTONS & CHATBOT --- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(137, 199, 88, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(137, 199, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(137, 199, 88, 0); }
}
.floating-btn {
  position: fixed; bottom: 100px; right: 30px; background: var(--primary-accent);
  color: var(--bg-dark); border: none; border-radius: 50px; padding: 15px 25px;
  font-weight: bold; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,0.3); z-index: 999;
  display: flex; align-items: center; gap: 8px; transition: all 0.3s ease;
}
.floating-btn:hover {
  transform: translateY(-3px); box-shadow: 0 12px 25px rgba(0,0,0,0.4); background: var(--primary-accent-hover);
}
.back-to-top {
  position: fixed; bottom: 180px; right: 30px; width: 50px; height: 50px;
  background: rgba(137, 199, 88, 0.8); color: var(--bg-dark); border: none;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease;
  z-index: 998; box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-accent); transform: translateY(-3px); }
#ai-chat-btn {
  position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
  background-color: var(--primary-accent); color: var(--bg-dark); border: none;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  z-index: 1000; transition: all 0.3s ease; animation: pulse 2s infinite;
}
#ai-chat-btn:hover {
  transform: scale(1.1); box-shadow: 0 12px 25px rgba(0,0,0,0.4); background-color: var(--primary-accent-hover);
}
#ai-chat-widget {
  position: fixed; bottom: 100px; right: 30px; width: 350px; max-width: 90vw;
  height: 500px; max-height: 70vh; background-color: var(--chatbot-bg); border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column;
  overflow: hidden; z-index: 1001; transform-origin: bottom right;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#ai-chat-widget.hidden { transform: scale(0); opacity: 0; pointer-events: none; }
.chat-header {
  background-color: var(--primary-accent); color: var(--bg-dark); padding: 15px 20px;
  font-weight: bold; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.chat-header div { display: flex; align-items: center; gap: 10px; }
.chat-header i { font-size: 1.2rem; }
#close-chat-btn {
  background: none; border: none; color: var(--bg-dark); font-size: 24px;
  cursor: pointer; opacity: 0.8; transition: opacity 0.2s;
}
#close-chat-btn:hover { opacity: 1; }
.chat-messages {
  flex-grow: 1; padding: 20px; overflow-y: auto; color: var(--text-dark);
  display: flex; flex-direction: column; gap: 15px;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: #e0e0e0; }
.chat-messages::-webkit-scrollbar-thumb { background-color: var(--primary-accent); border-radius: 6px; }
.chat-message { padding: 10px 15px; border-radius: 18px; max-width: 80%; line-height: 1.4; word-wrap: break-word; }
.chat-message a { color: var(--bg-dark); font-weight: bold; }
.bot-message {
  background-color: var(--chatbot-bot-msg-bg); border: 1px solid var(--chatbot-bot-msg-border);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.user-message {
  background-color: var(--primary-accent); color: var(--bg-dark);
  align-self: flex-end; border-bottom-right-radius: 4px;
}
@keyframes typing-bubble { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
.typing-indicator { align-items: center; gap: 5px; padding: 10px 15px; }
.typing-indicator span {
  width: 8px; height: 8px; background-color: #888; border-radius: 50%; animation: typing-bubble 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
.chat-input-area { display: flex; border-top: 1px solid #ddd; padding: 10px; flex-shrink: 0; background-color: #fff; }
#chat-input {
  flex-grow: 1; border: none; outline: none; padding: 10px; font-size: 1rem;
  background: transparent; color: var(--text-dark);
}
#send-chat-btn {
  background: none; border: none; color: var(--primary-accent); font-size: 20px;
  cursor: pointer; padding: 0 10px; transition: color 0.2s;
}
#send-chat-btn:hover { color: var(--primary-accent-hover); }

/* --- FOOTER --- */
footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
  text-align: left; gap: 30px; padding: 40px; background-color: var(--bg-footer); position: relative;
}
footer:before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
  background: linear-gradient(90deg, var(--primary-accent-hover), var(--primary-accent), var(--primary-accent-hover));
}
.footer-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 15px; }
.footer-logos a { display: inline-block; transition: all 0.3s ease; }
.footer-logos a:hover { transform: translateY(-5px); }
.footer-logos a img { height: 45px; transition: transform 0.3s ease; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2)); }
.footer-logos a:hover img { transform: scale(1.15); }
.social-icons { margin-top: 20px; display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; }
.social-icons a {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  background: rgba(255,255,255,0.1); border-radius: 50%; transition: all 0.3s ease;
}
.social-icons a:hover { background: var(--button-prev-bg-hover); transform: translateY(-3px); }
.social-icons a img { height: 22px; transition: transform 0.3s ease; }
.social-icons a:hover img { transform: scale(1.15); }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  nav {
    position: fixed; top: 80px; right: 0; background-color: var(--text-dark); flex-direction: column;
    align-items: flex-start; padding: 20px; gap: 15px; transform: translateX(100%);
    transition: transform 0.3s ease; width: 250px; height: auto; margin-right: 0;
    border-top-left-radius: 15px; border-bottom-left-radius: 15px; box-shadow: -2px 2px 10px rgba(0,0,0,0.4); z-index: 1002;
  }
  nav.active { transform: translateX(0); }
  nav a.active { color: var(--bg-dark); box-shadow: none; }
  .container, .insights-container { padding: 30px 15px; }
  .section, .insight-card { padding: 30px 20px; }
  footer { flex-direction: column; align-items: center; text-align: center; padding: 30px 20px; }
  .title h1 { font-size: 2.2rem; }
  .section h2 { font-size: 2rem; }
  .insight-card { width: 100%; height: auto; }
  .insight-card .button { position: relative; bottom: auto; margin-top: 20px; }
  .carousel-arrow { font-size: 2rem; width: 40px; height: 40px; }
  .carousel-arrow.left { left: 5px; }
  .carousel-arrow.right { right: 5px; }
  #ai-chat-btn { right: 20px; bottom: 20px; }
  .floating-btn { right: 20px; bottom: 90px; padding: 12px 20px; }
  .back-to-top { right: 20px; bottom: 155px; width: 45px; height: 45px; }
  #ai-chat-widget {
    right: 10px; left: 10px; bottom: 90px; width: auto; max-width: none;
    height: calc(100vh - 120px); max-height: none;
  }
}
@media (max-width: 480px) {
  header { padding: 3px 20px 3px 10px; }
  .logo a img { height: 80px; }
  .title h1 { font-size: 1.8rem; }
  .section h2 { font-size: 1.7rem; }
  .nav-button, .insight-card .button { padding: 10px 15px; font-size: 0.9rem; }
  .insight-card .button { height: auto; line-height: normal; padding: 12px 20px; }
  .carousel-caption { font-size: 1rem; padding: 0 5px; }
}