/* ==========================================================================
   ZAHIQ AI - Visual Features Section
   Asymmetric Bento Grid with Interactive Elements
   ========================================================================== */

.features-section {
  padding: var(--space-20) 0 var(--space-24) 0;
  background: var(--surface);
  position: relative;
}

.features-container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-10);
}

/* Features Header */
.features-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.features-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-tight);
}

.features-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

/* Bento Grid Layout */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: var(--space-8);
}

/* Bento Card Base */
.bento-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: var(--transition-all);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-3);
}

.bento-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-largest);
  border-color: transparent;
  background: linear-gradient(var(--background), var(--background)) padding-box,
              var(--gradient-primary) border-box;
}

/* Bento Card Sizes */
.bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-tall {
  grid-row: span 2;
}

.bento-wide {
  grid-column: span 2;
}

/* Bento Content */
.bento-content {
  position: relative;
  z-index: 1;
}

.bento-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
}

.bento-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Feature List */
.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  padding-left: var(--space-1);
}

/* Bento Visuals */
.bento-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-4);
}

/* Conversation Demo */
.conversation-demo {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  max-width: 80%;
  animation: message-slide 0.5s ease;
}

@keyframes message-slide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  background: var(--surface);
  align-self: flex-end;
  border-bottom-right-radius: var(--radius-sm);
}

.message.ai {
  background: var(--gradient-primary);
  color: var(--background);
  align-self: flex-start;
  border-bottom-left-radius: var(--radius-sm);
}

.message:nth-child(1) { animation-delay: 0.2s; }
.message:nth-child(2) { animation-delay: 0.4s; }
.message:nth-child(3) { animation-delay: 0.6s; }
.message:nth-child(4) { animation-delay: 0.8s; }

/* Language Globe */
.language-globe {
  width: 150px;
  height: 150px;
  position: relative;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.orbit {
  position: absolute;
  border: 1px dashed var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-1 {
  width: 50px;
  height: 50px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-2 {
  width: 100px;
  height: 100px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.language-dot {
  position: absolute;
  width: 30px;
  height: 30px;
  background: var(--gradient-primary);
  color: var(--background);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  box-shadow: var(--shadow-medium);
  animation: counter-rotate 20s linear infinite;
}

@keyframes counter-rotate {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.orbit-2 .language-dot:nth-child(1) { top: -10px; left: 50%; transform: translateX(-50%); }
.orbit-2 .language-dot:nth-child(2) { bottom: -10px; left: 50%; transform: translateX(-50%); }
.orbit-2 .language-dot:nth-child(3) { left: -10px; top: 50%; transform: translateY(-50%); }
.orbit-2 .language-dot:nth-child(4) { right: -10px; top: 50%; transform: translateY(-50%); }

.orbit-3 .language-dot:nth-child(1) { top: -5px; left: 20%; }
.orbit-3 .language-dot:nth-child(2) { top: 15px; right: 5px; }
.orbit-3 .language-dot:nth-child(3) { bottom: 15px; right: 5px; }
.orbit-3 .language-dot:nth-child(4) { bottom: -5px; left: 50%; transform: translateX(-50%); }
.orbit-3 .language-dot:nth-child(5) { bottom: 15px; left: 5px; }
.orbit-3 .language-dot:nth-child(6) { top: 15px; left: 5px; }

/* Mini Chart */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: 100px;
}

.chart-bar {
  flex: 1;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  animation: grow-bar 1s ease-out;
  position: relative;
}

@keyframes grow-bar {
  from { height: 0; }
}

.chart-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
}

.chart-bar:nth-child(1) { animation-delay: 0.1s; }
.chart-bar:nth-child(2) { animation-delay: 0.2s; }
.chart-bar:nth-child(3) { animation-delay: 0.3s; }
.chart-bar:nth-child(4) { animation-delay: 0.4s; }
.chart-bar:nth-child(5) { animation-delay: 0.5s; }

/* Integration Icons */
.integration-icons {
  display: flex;
  gap: var(--space-4);
}

.integration-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  animation: float 3s ease-in-out infinite;
}

.integration-icon:nth-child(1) { animation-delay: 0s; }
.integration-icon:nth-child(2) { animation-delay: 0.5s; }
.integration-icon:nth-child(3) { animation-delay: 1s; }

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

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  width: 100%;
}

.calendar-slot {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  transition: var(--transition-all);
}

.calendar-slot.available {
  background: var(--border);
}

.calendar-slot.booked {
  background: var(--text-muted);
}

.calendar-slot.optimized {
  background: var(--gradient-accent);
  animation: pulse-optimized 2s ease-in-out infinite;
}

@keyframes pulse-optimized {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 214, 143, 0.4);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(0, 214, 143, 0);
  }
}

/* Hover Effects */
.bento-card:hover .language-globe {
  animation-duration: 5s;
}

.bento-card:hover .chart-bar {
  animation: wave-bars 1s ease-in-out infinite;
}

@keyframes wave-bars {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.2); }
}

/* Responsive */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  
  .bento-large {
    grid-column: span 2;
  }
  
  .bento-wide {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: var(--space-4);
  }

  .features-container {
    padding: 0 var(--space-6);
  }

  .section-title {
    font-size: var(--text-3xl);
  }

  .section-subtitle {
    font-size: var(--text-base);
  }

  .bento-card {
    min-height: 200px;
    padding: var(--space-6);
  }

  .card-title {
    font-size: var(--text-xl);
  }

  .card-description {
    font-size: var(--text-sm);
  }

  .bento-large,
  .bento-tall,
  .bento-wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .language-globe {
    width: 120px;
    height: 120px;
  }

  .language-dot {
    width: 28px;
    height: 28px;
    font-size: var(--text-xs);
  }
}

@media (max-width: 640px) {
  .features-container {
    padding: 0 var(--space-4);
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .bento-card {
    padding: var(--space-5);
  }

  .card-title {
    font-size: var(--text-lg);
  }

  .card-description {
    font-size: var(--text-xs);
  }

  .language-globe {
    width: 100px;
    height: 100px;
  }

  .language-dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
}