/* Base styles and resets */
:root {
  --primary: #8E44AD;
  --primary-dark: #7D3C98;
  --primary-light: #9B59B6;
  --secondary: #2980B9;
  --text-dark: #2C3E50;
  --text-light: #7F8C8D;
  --background: #FFFFFF;
  --background-alt: #F4F6F9;
  --border-radius: 10px;
  --box-shadow: 0 5px 20px rgba(142, 68, 173, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--background);
  overflow-x: hidden;
}

.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul {
  list-style: none;
}

section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.section-title:after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--primary);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* Header styles */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 15px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo h1 span {
  color: var(--primary);
}

nav ul {
  display: flex;
  gap: 30px;
}

nav ul li a {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
}

nav ul li a:hover {
  color: var(--primary);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

nav ul li a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 25px;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-dark);
  margin: 5px 0;
  border-radius: 3px;
  transition: var(--transition);
}

/* Hero section */
.hero {
  padding: 70px 0;
  background: linear-gradient(135deg, #F4F6F9 0%, #E8E8E8 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content {
  order: 1;
}

.chat-demo {
  order: 2;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  max-width: 350px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero h2 span {
  color: var(--primary);
  position: relative;
}

.hero h2 span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(142, 68, 173, 0.2);
  z-index: -1;
}

.hero p {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* Chat demo styling */
.chat-header {
  background-color: var(--primary);
  color: white;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status.online {
  background-color: #2ECC71;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.3);
}

.chat-name {
  font-weight: 500;
  font-size: 1.1rem;
}

.chat-messages {
  padding: 20px;
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #F8F9FA;
}

.message {
  display: flex;
  margin-bottom: 15px;
}

.message-bubble {
  padding: 12px 15px;
  border-radius: 18px;
  max-width: 80%;
}

.message.bot {
  align-self: flex-start;
}

.message.bot .message-bubble {
  background-color: #E8E8E8;
  border-bottom-left-radius: 5px;
  color: var(--text-dark);
}

.message.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.message.user .message-bubble {
  background-color: var(--primary);
  color: white;
  border-bottom-right-radius: 5px;
}

.typing-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  background-color: #E8E8E8;
  border-radius: 18px;
  border-bottom-left-radius: 5px;
  width: 70px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: var(--text-light);
  border-radius: 50%;
  margin: 0 2px;
  display: inline-block;
  animation: typing 1.5s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.3s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes typing {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Button styles */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: 50px;
  text-align: center;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(142, 68, 173, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(142, 68, 173, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(142, 68, 173, 0);
  }
}

/* About section */
.about {
  background-color: var(--background);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature {
  background-color: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(142, 68, 173, 0.15);
}

.feature-icon {
  margin-bottom: 20px;
}

.feature h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: var(--text-dark);
}

.feature p {
  color: var(--text-light);
}

/* Features section */
.features {
  background-color: var(--background-alt);
}

.features .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.features-content h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.features-list {
  margin-bottom: 30px;
}

.features-list li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1.05rem;
}

.features-list li svg {
  margin-right: 15px;
}

.features-image {
  display: flex;
  justify-content: center;
}

/* FAQ section */
.faq {
  background-color: var(--background);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  background-color: white;
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.faq-question {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background-color: white;
  transition: var(--transition);
}

.faq-question:hover {
  background-color: #F8F9FA;
}

.faq-question h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
}

.toggle {
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 20px 20px;
  max-height: 1000px;
}

.faq-item.active .toggle {
  transform: rotate(45deg);
}

.faq-answer p {
  color: var(--text-light);
}

/* CTA section */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  text-align: center;
  color: white;
  padding: 80px 0;
}

.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.cta .btn-primary {
  background-color: white;
  color: var(--primary);
}

.cta .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-dark);
}

/* Footer */
footer {
  background-color: #2C3E50;
  color: white;
  padding: 60px 0 20px;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}

.footer-logo span {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-column h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background-color: var(--primary-light);
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #ECF0F1;
  transition: var(--transition);
}

.footer-column ul li a:hover {
  color: var(--primary-light);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #BDC3C7;
}

/* Responsive styles */
@media (max-width: 992px) {
  section {
    padding: 60px 0;
  }
  
  .hero .container,
  .features .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content,
  .chat-demo {
    order: unset;
  }
  
  .hero h2 {
    font-size: 2.2rem;
  }
  
  .features-content {
    order: 1;
  }
  
  .features-image {
    order: 2;
    margin-top: 30px;
  }
  
  .features-list li {
    justify-content: center;
  }
  
  .chat-demo {
    max-width: 350px;
    margin: 0 auto 30px;
  }
  
  .features-image svg {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }
  
  nav.active {
    display: block;
  }
  
  nav ul {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-content {
    flex-direction: column;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.feature, .faq-item {
  animation: fadeIn 0.6s ease forwards;
}
