/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 48px;
  font-weight: 500;
  font-size: 17px;
  border-radius: var(--border-radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--color-accent-primary);
  color: #ffffff;
  border: none;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-secondary {
  background-color: var(--color-bg-tertiary);
  /* Use tertiary for secondary buttons */
  color: var(--color-accent-primary);
  border: none;
}

.btn-secondary:hover {
  background-color: rgba(41, 151, 255, 0.1);
}

/* Language Button Style */
.btn-lang {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.01em;
}

.btn-lang:hover {
  color: var(--color-text-primary);
  opacity: 1;
}

/* Cards (Bento Grid) */
.card {
  background: var(--color-bg-secondary);
  border: none;
  border-radius: var(--border-radius-lg);
  padding: 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* 3D Tilt Prep */
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out, box-shadow var(--transition-smooth);
  overflow: hidden;
  position: relative;
  /* Optional: Subtle top highlight for depth */
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

/* Ensure card text wraps properly */
.card-text {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  flex: 1;
}

/* Contact cards styling */
.contact-cards {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.contact-card {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  background: var(--color-bg-secondary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Spotlight Effect */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: radial-gradient(
    800px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.4),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  /* Scale is handled by JS tilt now for smoother interaction */
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

/* Apple-style icon container */
.card-icon {
  width: 64px;
  height: 64px;
  background: var(--color-bg-tertiary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-accent-primary);
  font-size: 24px;
}

.card-title {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.card-text {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  font-weight: 400;
  white-space: pre-line;
}

/* Pricing section card centering */
#pricing .card {
  text-align: center;
}

/* Product Card */
.product-card {
  background: var(--color-bg-secondary);
  border: none;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  height: 100%;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.product-preview {
  height: 350px;
  /* Taller visuals */
  background: #f5f5f7;
  /* Light Gray for Light Mode */
  /* Dark placeholder */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  position: relative;
}

.product-info {
  padding: 30px;
}

/* Forms - Clean & Minimal */
.form-group {
  margin-bottom: 24px;
}

.input-field {
  width: 100%;
  padding: 0 16px;
  height: 52px;
  background: var(--color-bg-tertiary);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 17px;
  transition: all 0.2s ease;
}

.input-field::placeholder {
  color: var(--color-text-muted);
}

.input-field:focus {
  outline: none;
  background: var(--color-bg-secondary);
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 4px var(--color-accent-dim);
}

.input-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text-secondary);
  font-size: 17px;
  font-weight: 400;
  margin-left: 0;
}

/* AI Chatbot Styles */
#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: var(--font-family-base);
}

/* Bot Icon Styles */
.bot-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-fast) ease;
  color: white;
  position: relative;
  z-index: 1001;
}

.bot-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 16px 32px rgba(0, 113, 227, 0.3);
}

.bot-icon.dragging {
  cursor: grabbing;
  opacity: 0.8;
}

/* Chat Window Styles */
.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  max-height: 480px;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast) ease;
}

.chat-window.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Chat Header */
.chat-header {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.chat-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition-fast) ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Messages Container */
.messages-container {
  flex: 1;
  padding: var(--spacing-md);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  background: var(--color-bg-secondary);
}

.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.messages-container::-webkit-scrollbar-thumb {
  background: var(--color-bg-tertiary);
  border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: var(--border-color);
}

/* Message Bubbles */
.message {
  display: flex;
  margin-bottom: var(--spacing-sm);
  max-width: 100%;
}

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

.message.bot {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 80%;
  padding: var(--spacing-sm);
  border-radius: var(--border-radius-md);
  word-wrap: break-word;
  line-height: 1.4;
}

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

.message.bot .message-bubble {
  background: white;
  color: var(--color-text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

/* Input Container */
.input-container {
  padding: var(--spacing-sm);
  background: white;
  border-top: 1px solid var(--border-color);
}

.message-form {
  display: flex;
  gap: var(--spacing-xs);
  align-items: center;
}

.message-input {
  flex: 1;
  padding: var(--spacing-sm);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  font-size: 0.9rem;
  font-family: var(--font-family-base);
  outline: none;
  transition: all var(--transition-fast) ease;
  background: var(--color-bg-secondary);
}

.message-input:focus {
  border-color: var(--color-accent-primary);
  background: white;
  box-shadow: 0 0 0 3px var(--color-accent-dim);
}

.send-btn {
  width: 40px;
  height: 40px;
  background: var(--color-accent-primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
  color: white;
}

.send-btn:hover {
  background: var(--color-accent-hover);
  transform: scale(1.05);
}

.send-btn:active {
  transform: scale(0.95);
}

/* Loading Animation for Bot Messages */
.loading {
  display: flex;
  gap: 6px;
  padding: var(--spacing-sm);
}

.loading-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent-primary);
  border-radius: 50%;
  animation: loading-bounce 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 40px);
    max-height: 70vh;
    bottom: 70px;
    right: 20px;
  }

  .bot-icon {
    width: 56px;
    height: 56px;
  }
}
