/* Chatbot Toggle Button */
#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(270deg, #D8B68D, #7A5C42);
    background-size: 400% 400%;
    animation: animateToggleGradient 6s ease infinite;
    color: white;
    border-radius: 50%;
    font-size: 24px;
    width: 70px;
    height: 70px;
    text-align: center;
    line-height: 70px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes animateToggleGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Robot Logo Hover - Spinning Effect */
#chatbot-toggle img.chatbot-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%; /* Makes the image circular */
    object-fit: cover;  /* Ensures the square image fills the circular button */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); /* subtle shadow for visibility */
}


#chatbot-toggle img.chatbot-logo:hover {
    transform: scale(1.1);
}

/* Chatbot Frame */
#chatbot-frame {
    position: fixed;
    bottom: 105px;
    right: 20px;
    width: 315px;
    height: 410px;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 999;
    background-color: white;
    overflow: hidden;
    
    /* For fade-in/fade-out animation */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* When chatbot is visible */
#chatbot-frame.show {
    opacity: 1;
}

/* Reset Chat Button */
.reset-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px; /* Smaller font size */
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 5px 10px; /* Reduced padding */
    border-radius: 50%; /* Keeps it circular */
    width: 40px; /* Set width */
    height: 40px; /* Set height */
}

.reset-btn:hover {
    transform: rotate(360deg); /* Spin the button on hover */
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.chatbot-box {
    width: 100%;
    height: 100%;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    background-color: white;
    box-sizing: border-box;
}

.chat-header {
    font-family: 'Lora', sans-serif;
    background: linear-gradient(270deg, #2E5339, #7BB661);
    background-size: 400% 400%;
    animation: pineDawn 12s ease infinite;
    color: white;
    padding: 3px 10px;
    text-align: center;
    margin: 0;
    box-sizing: border-box;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

@keyframes pineDawn {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}



.chat-body {
    flex-grow: 1;
    overflow-y: scroll;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#chatbot-buttons-container {
    padding: 10px;
    background-color: #f4f4f4;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
}

#chatbot-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 90%;
    max-width: 260px;
    justify-items: center;
    padding: 5px;
}

.message {
    max-width: 70%;
    margin: 8px 10px;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    display: inline-block;
    clear: both;
}

.user-message {
    align-self: flex-end;
    background-color: #E0C69F; /* metallic purple */
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 10px 15px;
    margin: 8px;
    max-width: 60%;
    font-size: 14px;
}

.bot-message {
    align-self: flex-start;
    background-color: #e5e5ea;
    color: black;
    border-radius: 20px;
    padding: 10px 15px;
    margin: 8px;
    max-width: 60%;
    font-size: 14px;
}

.typing {
    background-color: #e5e5ea;
    border-radius: 20px;
    padding: 10px 15px;
    margin: 8px 10px;
    display: inline-block;
    max-width: 60px;
}

.typing-dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 24px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #555;
    border-radius: 50%;
    opacity: 0.4;
    animation: bounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

#chatbot-messages::after {
    content: "";
    display: block;
    clear: both;
}

#chatbot-messages {
    display: flex;
    flex-direction: column;
}

.chatbot-btn {
    width: 100%;
    height: 45px;
    background: linear-gradient(to right, #355E3B, #EDE6D0);
    background-size: 200% 200%; /* This allows the gradient to animate */
    color: white;
    font-family: 'Lora', sans-serif;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.2s ease, background-position 0.5s ease; /* Adds smooth scaling and background transition */
}

.chatbot-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25);
    animation: forestSandHover 4s ease infinite;
}

@keyframes forestSandHover {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
    justify-items: stretch;
}


/* HOMEPAGE */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f8f6;
  color: #2c3e50;
  line-height: 1.6;
}

header {
    /* Gradient background with animation */
    background: linear-gradient(270deg, #2e6b2e, #4caf50, #7bb661, #2e6b2e);
    background-size: 800% 800%;
    animation: gradientShift 15s ease infinite;
  
    color: white;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Times New Roman', Times, serif;
  }
  
  /* Animation keyframes for smooth gradient movement */
  @keyframes gradientShift {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  

header h1 {
  margin: 0;
  font-weight: 700;
  font-size: 1.8rem;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s;
}

nav a:hover {
  color: #a9d18e; /* lighter green */
}

.hero {
    background: #2e6b2e url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 0 20px;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Times New Roman', Times, serif;
  }
  

main {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

section {
  margin-bottom: 40px;
}

section h2 {
  color:#8e2de2;
  padding-bottom: 5px;
  margin-bottom: 15px;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
}

section p {
  font-size: 1.1rem;
  color: #444;
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
}