/* Base Styles */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --accent-color: #28a745;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --danger-color: #dc3545;
  --sky-blue: #87ceeb;
  --saffron: #ff9933;
  --white: #ffffff;
  --off-white: #f5f7fa;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --dark-gray: #495057;
  --border-radius: 8px;
  --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease-in-out;
}

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

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

/* Loading Spinner */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 123, 255, 0.3);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Topbar Styles */
.topbar {
  font-size: 0.85rem;
}

.topbar .contact-info span {
  margin-right: 15px;
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-text {
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand {
  font-weight: 700;
}

.navbar-nav .nav-link {
  font-weight: 500;
  margin: 0 5px;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
  padding-top: 150px !important;
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(255, 153, 51, 0.1));
  min-height: 100vh;
}

/* Glassmorphism effect for hero content */
.hero-content-glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.hero-section h1 {
  color: var(--dark-color);
  line-height: 1.2;
}

.hero-section .lead {
  font-size: 1.25rem;
  color: var(--dark-gray);
}

/* Video Background Styles */
.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.video-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}

.video-background iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-section {
    padding-top: 120px !important;
    min-height: auto;
  }
  
  .video-background iframe {
    width: 100vw;
    height: 100vh;
    min-height: 100%;
    min-width: 100%;
  }
}

.hero-image {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.mockup-container {
  height: 400px;
  position: relative;
}

.device-mockup .device-screen {
  width: 180px;
  height: 300px;
  border: 1px solid #ddd;
}

.device-mockup.tablet .device-screen {
  width: 220px;
  height: 180px;
}

/* Problem-Solution Section */
.problem-solution-section .problem-item h5,
.problem-solution-section .solution-item h5 {
  font-weight: 600;
}

/* Modules Showcase Section */
.modules-showcase-section .icon-wrapper {
  transition: transform 0.3s ease;
}

.modules-showcase-section .card:hover .icon-wrapper {
  transform: scale(1.1);
}

/* Tab Styles */
.nav-tabs .nav-link {
  font-weight: 500;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--gray);
}

.nav-tabs .nav-link.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  background: transparent;
}

.nav-tabs .nav-link:hover {
  border-bottom: 3px solid var(--primary-color);
}

/* Differentiators Section */
.differentiators-section .icon-wrapper {
  transition: transform 0.3s ease;
}

.differentiators-section .card:hover .icon-wrapper {
  transform: scale(1.1);
}

/* Pricing Calculator */
#pricing-calculator .form-check {
  margin-bottom: 0.5rem;
}

#pricing-calculator .form-check label {
  font-weight: 500;
}

.modules-list .module-item {
  padding: 8px 0;
}

.modules-list .module-item input[type="checkbox"] {
  margin-right: 10px;
}

.modules-list .module-item label {
  font-weight: 500;
  cursor: pointer;
}

.addon-checkbox {
  margin-right: 8px;
}

#unitCountInput {
  max-width: 100px;
  display: inline-block;
}

.unit-input {
  width: 100px !important;
  text-align: center;
  font-weight: 600;
}

.unit-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* SOP Timeline Styles */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #007bff;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 100%;
}

.timeline-badge {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  left: 50%;
  margin-left: -10px;
  top: 30px;
  z-index: 100;
}

.timeline-panel {
  width: 45%;
  float: left;
  margin: 20px 0;
}

.timeline-item:nth-child(even) .timeline-panel {
  float: right;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-badge {
    left: 30px;
    margin-left: 0;
  }
  
  .timeline-panel {
    width: calc(100% - 80px);
    float: right;
  }
  
  .timeline-item:nth-child(even) .timeline-panel {
    float: right;
  }
}

/* Screenshots Section */
.screenshots-section .screenshot-placeholder {
  transition: transform 0.3s ease;
}

.screenshots-section .card:hover .screenshot-placeholder {
  transform: scale(1.05);
}

/* Franchise CTA Section */
.franchise-cta-section .benefit-item {
  font-size: 1.1rem;
}

.franchise-cta-section .benefit-item i {
  color: var(--success-color);
}

/* Testimonials Section */
.testimonial-card {
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

/* Feature Cards */
.feature-card {
  transition: var(--transition);
  border: 1px solid var(--light-gray);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow);
}

.feature-icon {
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* Services Section */
.service-category {
  transition: var(--transition);
  border: 1px solid var(--light-gray);
}

.service-category:hover {
  box-shadow: var(--box-shadow);
}

.document-card {
  transition: var(--transition);
  border: 1px solid var(--light-gray);
}

.document-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

.document-icon {
  transition: var(--transition);
}

.document-card:hover .document-icon {
  transform: scale(1.1);
}

.cta-box {
  transition: var(--transition);
}

.cta-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2) !important;
}

/* Pricing Section */
.pricing-card {
  transition: var(--transition);
  border: 1px solid var(--light-gray);
}

.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow);
}

.pricing-card .price {
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

/* Addons Section */
.addon-card {
  transition: var(--transition);
  border: 1px solid var(--light-gray);
}

.addon-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow);
}

/* Footer Styles */
.site-footer a {
  transition: var(--transition);
}

.site-footer a:hover {
  color: var(--white) !important;
  text-decoration: underline;
}

/* Animations */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Problem-Solution Section */
.problem-solution-section .icon-wrapper {
  transition: transform 0.3s ease;
}

.problem-solution-section .card:hover .icon-wrapper {
  transform: scale(1.1);
}

/* Modules Showcase Section */
.modules-showcase-section .icon-wrapper {
  transition: transform 0.3s ease;
}

.modules-showcase-section .card:hover .icon-wrapper {
  transform: scale(1.1);
}

/* Language Switcher */
.language-switcher-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Assistant Chatbot Styles */
.assistant-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 520px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: none; /* Hidden by default */
  flex-direction: column;
  z-index: 99999 !important;
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.assistant-container *,
.assistant-container *::before,
.assistant-container *::after {
  box-sizing: inherit;
}

.assistant-header {
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.assistant-logo {
  font-size: 24px;
  margin-right: 12px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.assistant-title h5 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.assistant-title small {
  opacity: 0.9;
  font-size: 12px;
  margin-top: 2px;
  display: block;
}

.assistant-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-control {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-control:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.btn-control.speaking {
  background: rgba(255, 255, 255, 0.4);
  animation: pulse 1s infinite;
}

.gap-2 {
  gap: 0.5rem;
}

.flex-fill {
  flex: 1 1 auto;
}

.assistant-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0; /* Allow flex items to shrink below their content size */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  overflow: hidden; /* Prevent content from overflowing */
}

.chat-messages {
  height: 358px;
  padding: 0px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow flex items to shrink below their content size */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  background: white;
}

/* Custom scrollbar */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.message {
  display: flex;
  margin-bottom: 16px;
  max-width: 85%;
  animation: fadeIn 0.3s ease-out;
}

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

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  margin: 0 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-avatar {
  background: var(--secondary-color);
}

.message-content {
  max-width: calc(100% - 50px);
}

.user-message .message-content {
  text-align: right;
}

.message-text {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.assistant-message .message-text {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-bottom-left-radius: 4px;
  color: #333;
}

.user-message .message-text {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 11px;
  color: #6c757d;
  margin-top: 4px;
  padding: 0 4px;
}

.user-message .message-time {
  text-align: right;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-input-area {
  padding: 7px;
  border-top: 1px solid #eee;
  flex-shrink: 0; /* Prevent input area from shrinking */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
  background: #f8f9fa;
}

.user-info-request {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 10px 15px;
  border: 1px solid #e9ecef;
}

.user-info-request .input-group {
  margin-bottom: 10px;
}

.user-info-request .form-control {
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid #ced4da;
}

.user-info-request .btn-sm {
  padding: 5px 15px;
  font-size: 14px;
  border-radius: 8px;
  background: var(--primary-color);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-info-request .btn-sm:hover {
  background: #0056b3;
  transform: scale(1.05);
}

.follow-up-actions {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  margin: 10px 15px;
  border: 1px solid #e9ecef;
}

.follow-up-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.follow-up-actions .btn:hover {
  transform: scale(1.02);
  text-decoration: none;
}

.follow-up-actions .btn-success {
  background: #28a745;
  border: 1px solid #28a745;
  color: white;
}

.follow-up-actions .btn-primary {
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: white;
}

.input-group {
  display: flex;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  padding: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#assistant-input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  background: transparent;
}

#assistant-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#assistant-input::placeholder {
  color: #6c757d;
}

#send-message, #voiceInputBtn {
  margin-left: 10px;
  border-radius: 8px 0 0 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#send-message:hover, #voiceInputBtn:hover {
  background: #0056b3;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#voiceInputBtn.recording {
  background: var(--danger-color);
  animation: pulse 1.5s infinite;
  box-shadow: 0 2px 10px rgba(220, 53, 69, 0.4);
  border-radius: 8px;
}

#voiceInputBtn.recording:hover {
  background: #bd2130;
  transform: scale(1.05);
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 2px 5px rgba(220, 53, 69, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 4px 15px rgba(220, 53, 69, 0.6); }
  100% { transform: scale(1); box-shadow: 0 2px 5px rgba(220, 53, 69, 0.4); }
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  margin-bottom: 16px;
  width: fit-content;
  max-width: 85%;
}

.typing-indicator span {
  height: 8px;
  width: 8px;
  background: #6c757d;
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out;
}

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

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

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

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

.assistant-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  z-index: 99998 !important;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  font-size: 24px;
  border: none;
  outline: none;
}

.assistant-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.assistant-toggle.open {
  transform: rotate(180deg);
}

.assistant-toggle:active {
  transform: scale(0.95);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: var(--danger-color);
  border-radius: 50%;
  display: none;
}

.notification-badge.show {
  display: block;
}

@media (max-width: 576px) {
  .assistant-container {
    width: calc(100% - 40px);
    height: 77vh;
    bottom: 20px;
  }
}

/* Auth Overlay Styles */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-window {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.auth-overlay.open .auth-window {
  transform: scale(1);
}

.auth-header {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.1), rgba(255, 153, 51, 0.1));
}

.auth-logo {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-right: 15px;
}

.auth-title {
  flex: 1;
}

.auth-title h5 {
  margin: 0;
  font-weight: 600;
  color: var(--dark-color);
}

.auth-title small {
  color: var(--gray);
}

.auth-controls .btn-control {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.auth-controls .btn-control:hover {
  color: var(--danger-color);
}

.auth-body {
  padding: 30px;
}

.auth-content {
  width: 100%;
}

.auth-overlay .form-label {
  font-weight: 500;
  color: var(--dark-gray);
  margin-bottom: 8px;
}

.auth-overlay .input-group-text {
  background: var(--off-white);
  border-right: none;
}

.auth-overlay .form-control {
  border-left: none;
}

.auth-overlay .form-control:focus {
  border-color: #ced4da;
  box-shadow: none;
}

.auth-overlay .input-group:focus-within .input-group-text {
  border-color: var(--primary-color);
}

.auth-overlay .input-group:focus-within .form-control {
  border-color: var(--primary-color);
}

@media (max-width: 576px) {
  .auth-window {
    width: 95%;
    max-height: 95vh;
  }
  
  .auth-body {
    padding: 20px;
  }
}

/* SweetAlert z-index override */
.swal2-container {
  z-index: 20000 !important;
}

.swal2-popup {
  z-index: 20001 !important;
}

/* Ensure assistant is always on top */
.assistant-container {
  z-index: 15000 !important;
}

.assistant-toggle {
  z-index: 14999 !important;
}

/* Ensure assistant toggle is always visible */
#assistantToggle {
  display: flex !important;
  z-index: 14999 !important;
}