/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #1F1F1F;
  color: #F5F5F3;
  line-height: 1.6;
  scroll-behavior: smooth;
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(31, 31, 31, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #DADADA;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand h2 {
  color: #B65C43;
  font-weight: 600;
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: #F5F5F3;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.nav-menu a:hover {
  color: #B65C43;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: #F5F5F3;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #C7C7B8 0%, #F5F5F3 100%);
  color: #1F1F1F;
  padding: 120px 0 80px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: 2.5rem;
  opacity: 0.8;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-chatbot-hint {
  margin-top: 2rem;
  font-size: 1rem;
  opacity: 0.8;
  font-style: italic;
  color: #1F1F1F;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: #B65C43;
  color: #F5F5F3;
}

.btn-primary:hover {
  background: #96492F;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(182, 92, 67, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #1F1F1F;
  border-color: #1F1F1F;
}

.btn-secondary:hover {
  background: #1F1F1F;
  color: #F5F5F3;
}

/* Services Section */
.services {
  padding: 100px 0;
  background: #F5F5F3;
  color: #1F1F1F;
}

.services h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #1F1F1F;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: #1F1F1F;
  color: #F5F5F3;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #DADADA;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: #B65C43;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #F5F5F3;
}

.service-card p {
  opacity: 0.9;
  line-height: 1.6;
}

/* About Section */
.about {
  padding: 100px 0;
  background: #1F1F1F;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #B65C43;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background: #F5F5F3;
  color: #1F1F1F;
  border-radius: 12px;
  border: 1px solid #DADADA;
}

.stat h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #B65C43;
  margin-bottom: 0.5rem;
}

.stat p {
  font-weight: 500;
  opacity: 0.8;
}

/* Projects Section */
.projects {
  padding: 100px 0;
  background: #F5F5F3;
  color: #1F1F1F;
}

.projects h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #1F1F1F;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-top: 3rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: #1F1F1F;
  color: #F5F5F3;
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid #DADADA;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card:nth-child(even) {
  background: #C7C7B8;
  color: #1F1F1F;
}

.project-card:nth-child(even) .project-content {
  order: 2;
}

.project-card:nth-child(even) .project-image {
  order: 1;
}

.project-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: inherit;
}

.project-content p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.project-features {
  list-style: none;
  margin-bottom: 2rem;
}

.project-features li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.project-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.project-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-image img:hover {
  transform: scale(1.05);
}

.project-demo-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  object-fit: cover;
  max-height: 400px;
}

.project-demo-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(182, 92, 67, 0.2);
}

.placeholder-image {
  background: #DADADA;
  color: #1F1F1F;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.2rem;
}

.projects-note {
  text-align: center;
  margin-top: 3rem;
  padding: 1.5rem;
  background: #C7C7B8;
  border-radius: 12px;
  font-style: italic;
  color: #1F1F1F;
}

/* Testimonials Section */
.testimonials {
  padding: 100px 0;
  background: #1F1F1F;
}

.testimonials h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #B65C43;
}

.testimonial-placeholder {
  text-align: center;
  padding: 4rem;
  background: #F5F5F3;
  color: #1F1F1F;
  border-radius: 12px;
  border: 1px solid #DADADA;
}

/* Contact Section */
.contact {
  padding: 100px 0;
  background: #F5F5F3;
  color: #1F1F1F;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-text h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #B65C43;
}

.contact-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.contact-info {
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-icon {
  font-size: 1.5rem;
}

.contact-item a {
  color: #B65C43;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
}

.contact-item a:hover {
  text-decoration: underline;
}

.chatbot-cta {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(182, 92, 67, 0.1);
  border-radius: 8px;
  border-left: 3px solid #B65C43;
}

.chatbot-cta span:last-child {
  color: #1F1F1F;
  font-weight: 500;
  font-style: italic;
}

.contact-form {
  background: #1F1F1F;
  color: #F5F5F3;
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid #DADADA;
}

.contact-form h3 {
  margin-bottom: 1.5rem;
  color: #B65C43;
}

.form-placeholder {
  text-align: center;
  padding: 2rem;
  background: #C7C7B8;
  color: #1F1F1F;
  border-radius: 8px;
}

/* Footer */
.footer {
  background: #1F1F1F;
  color: #F5F5F3;
  padding: 3rem 0 1rem;
  border-top: 1px solid #DADADA;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  color: #B65C43;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: #F5F5F3;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: #B65C43;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #DADADA;
  opacity: 0.6;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0, 0, 0, 0.85);
  transition: opacity 0.3s;
}

.modal-content {
  display: block;
  margin: 60px auto;
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
  background: #F5F5F3;
}

.close {
  position: absolute;
  top: 24px;
  right: 36px;
  color: #F5F5F3;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: color 0.2s;
}

.close:hover {
  color: #B65C43;
}

/* Chatbot Styles */
#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Inter', sans-serif;
}

#chatbot-button {
  width: 60px;
  height: 60px;
  background: #B65C43;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(182, 92, 67, 0.3);
  transition: all 0.3s ease;
  color: #F5F5F3;
}

#chatbot-button:hover {
  background: #96492F;
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(182, 92, 67, 0.4);
}

#chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: #F5F5F3;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  transform-origin: bottom right;
}

#chatbot-window.chatbot-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
}

#chatbot-header {
  background: #1F1F1F;
  color: #F5F5F3;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #DADADA;
}

.chatbot-header-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chatbot-avatar {
  font-size: 1.5rem;
}

.chatbot-title h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #B65C43;
}

.chatbot-status {
  font-size: 0.8rem;
  color: #4CAF50;
  font-weight: 500;
}

#chatbot-close {
  background: none;
  border: none;
  color: #F5F5F3;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

#chatbot-close:hover {
  background: rgba(245, 245, 243, 0.1);
}

#chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: #F5F5F3;
  color: #1F1F1F;
}

.message {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.message-avatar {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.message-content {
  background: #1F1F1F;
  color: #F5F5F3;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
}

.message-content p {
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.message-content p:last-child {
  margin-bottom: 0;
}

/* Enhanced chatbot message formatting */
.message-content strong {
  font-weight: 600;
  color: inherit;
}

.message-content em {
  font-style: italic;
  opacity: 0.9;
}

.message-content a {
  color: #B65C43;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}

.message-content a:hover {
  opacity: 0.8;
}

.user-message .message-content a {
  color: #F5F5F3;
}

.message-content br + strong {
  display: inline-block;
  margin-top: 0.25rem;
}

.message-content ul, .message-content ol {
  margin: 0.5rem 0;
  padding-left: 1rem;
}

.message-content li {
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-content {
  background: #B65C43;
  color: #F5F5F3;
}

.user-message .message-avatar {
  order: -1;
}

#chatbot-input-area {
  padding: 1rem;
  background: #F5F5F3;
  border-top: 1px solid #DADADA;
}

.chatbot-input-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

#chatbot-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #DADADA;
  border-radius: 25px;
  background: #FFFFFF;
  color: #1F1F1F;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s ease;
}

#chatbot-input:focus {
  border-color: #B65C43;
}

#chatbot-send {
  width: 40px;
  height: 40px;
  background: #B65C43;
  border: none;
  border-radius: 50%;
  color: #F5F5F3;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#chatbot-send:hover {
  background: #96492F;
  transform: scale(1.05);
}

#chatbot-send:disabled {
  background: #C7C7B8;
  cursor: not-allowed;
  transform: none;
}

/* Scrollbar styles for chatbot */
#chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

#chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
  background: #DADADA;
  border-radius: 3px;
}

#chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: #C7C7B8;
}

/* Voice Beta Page Styles */
.nav-beta-btn {
  background: #B65C43 !important;
  color: #F5F5F3 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
}

.nav-beta-btn:hover {
  background: #96492F !important;
  transform: translateY(-1px) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(31, 31, 31, 0.98);
    flex-direction: column;
    justify-content: start;
    padding-top: 2rem;
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero {
    padding: 100px 0 60px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card:nth-child(even) .project-content {
    order: 1;
  }

  .project-card:nth-child(even) .project-image {
    order: 2;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary, .btn-secondary {
    width: 200px;
    text-align: center;
  }

  /* Mobile chatbot adjustments */
  #chatbot-container {
    bottom: 15px;
    right: 15px;
  }
  
  #chatbot-window {
    width: 300px;
    height: 450px;
    bottom: 70px;
  }
  
  #chatbot-button {
    width: 55px;
    height: 55px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .nav {
    padding: 1rem;
  }

  .services, .about, .projects, .testimonials, .contact {
    padding: 60px 0;
  }

  .service-card, .project-card, .contact-form {
    padding: 2rem 1.5rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  #chatbot-window {
    width: calc(100vw - 30px);
    right: -10px;
    height: 400px;
  }
}