:root{
  --accent: #6c5ce7;
  --accent-hover: #5a4fd4;
  --bg-grad-start: #f8f9ff;
  --bg-grad-end: #f0f4ff;
  --text-primary: #1a1a2e;
  --text-secondary: #6c757d;
  --border-light: #e7e9f3;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
}

.bg-gradient{
  background: linear-gradient(135deg, var(--bg-grad-start), var(--bg-grad-end));
  position: relative;
  overflow: hidden;
}

.bg-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.navbar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 1.5rem;
  color: var(--accent) !important;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-primary) !important;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent) !important;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.btn-outline-primary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.hero-illustration{
  background: white;
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-illustration::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.illustration-grid{
  display: grid;
  grid-template-columns: repeat(2, 96px);
  gap: 16px;
  padding: 2rem;
}

.agent-bubble{
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
  border: 2px dashed var(--border-light);
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
  overflow: hidden;
  padding: 8px;
}

.icon-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: all 0.3s ease;
}

.agent-bubble:nth-child(1) { animation-delay: 0s; }
.agent-bubble:nth-child(2) { animation-delay: 0.5s; }
.agent-bubble:nth-child(3) { animation-delay: 1s; }
.agent-bubble:nth-child(4) { animation-delay: 1.5s; }

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

.agent-bubble:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.agent-bubble:hover .icon-svg {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(108, 92, 231, 0.3));
}

.card {
  border: none;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.card-body {
  padding: 1.5rem;
}

.card-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

section {
  padding: 4rem 0;
}

section h2 {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.team-avatar { 
  width: 112px; 
  height: 112px; 
  object-fit: cover; 
  border: 3px solid #fff; 
  box-shadow: 0 0 0 2px var(--border-light), var(--shadow-sm);
  transition: all 0.3s ease;
}

.team-card { 
  cursor: pointer; 
  transition: all 0.3s ease;
  border-radius: 1rem;
  background: white;
}

.team-card:hover { 
  transform: translateY(-6px); 
  box-shadow: var(--shadow-lg);
}

.team-card:hover .team-avatar {
  box-shadow: 0 0 0 3px var(--accent), var(--shadow-md);
  transform: scale(1.05);
}

.team-card h6 {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1rem;
}

.team-card small {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.modal-content {
  border: none;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  color: var(--text-primary);
}

.form-control, .form-select {
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
  outline: none;
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

footer {
  background-color: #f8f9fa;
  margin-top: 4rem;
}

#lang-select {
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* RTL Support */
[dir="rtl"] .navbar-nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .d-flex.gap-2 {
  flex-direction: row-reverse;
}

[dir="rtl"] .d-flex.gap-3 {
  flex-direction: row-reverse;
}

[dir="rtl"] .row {
  direction: rtl;
}

/* Dashboard & Ticket Animations */
.dashboard-preview {
  min-height: 400px;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ticket-board {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.ticket-item {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  animation: slideInRight 0.6s ease-out forwards;
  opacity: 0;
  transform: translateX(-20px);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.ticket-item:nth-child(1) { animation-delay: 0.1s; }
.ticket-item:nth-child(2) { animation-delay: 0.2s; }
.ticket-item:nth-child(3) { animation-delay: 0.3s; }
.ticket-item:nth-child(4) { animation-delay: 0.4s; }
.ticket-item:nth-child(5) { animation-delay: 0.5s; }
.ticket-item:nth-child(6) { animation-delay: 0.6s; }

.ticket-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: currentColor;
}

.ticket-new {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1976d2;
  border-left: 4px solid #2196f3;
}

.ticket-in-progress {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #f57c00;
  border-left: 4px solid #ff9800;
}

.ticket-review {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #7b1fa2;
  border-left: 4px solid #9c27b0;
}

.ticket-done {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #388e3c;
  border-left: 4px solid #4caf50;
}

.ticket-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

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

.metrics-overlay {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.metric-card {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.metric-card:nth-child(1) { animation-delay: 0.7s; }
.metric-card:nth-child(2) { animation-delay: 0.8s; }
.metric-card:nth-child(3) { animation-delay: 0.9s; }

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

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cost Optimization Cards */
.optimization-card {
  transition: all 0.3s ease;
  border-top: 3px solid transparent;
}

.optimization-card:hover {
  transform: translateY(-8px);
  border-top-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.optimization-icon {
  font-size: 3rem;
  line-height: 1;
  filter: grayscale(0.3);
  transition: all 0.3s ease;
}

.optimization-card:hover .optimization-icon {
  filter: grayscale(0);
  transform: scale(1.1);
}

.feature-item {
  padding-left: 1.5rem;
  position: relative;
}

.feature-item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.25rem;
}

.feature-item h5 {
  color: var(--text-primary);
}

/* Enhanced animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.ticket-item.ticket-new::after {
  content: 'NEW';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  animation: pulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
  section {
    padding: 2rem 0;
  }
  
  section h2 {
    font-size: 2rem;
  }
  
  .illustration-grid {
    grid-template-columns: repeat(2, 80px);
    gap: 12px;
    padding: 1.5rem;
  }
  
  .agent-bubble {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
  
  .metrics-overlay {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .metric-value {
    font-size: 2rem;
  }
  
  .dashboard-preview {
    padding: 1.5rem;
    min-height: 300px;
  }
}
