/* ============================================
   MODERN UI COMPONENTS & ENHANCEMENTS
   ============================================ */

/* Section Spacing & Backgrounds */
section {
  position: relative;
  overflow: hidden;
}

section.section-dark {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
}

section.section-light {
  background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
}

section.section-accent {
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  color: white;
}

/* Modern Card Styles */
.modern-card {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.12);
  transform: translateY(-4px);
}

.modern-card.gradient-border {
  position: relative;
  padding: 0;
  background: white;
  border: none;
  overflow: hidden;
}

.modern-card.gradient-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #3b82f6, #0891b2);
  animation: gradient-shift 3s ease infinite;
}

.modern-card.gradient-border > * {
  padding: 2rem;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0%; }
  50% { background-position: 100%; }
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  border-radius: 1.25rem;
  background: white;
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
  border-color: #6366f1;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12);
  transform: translateY(-8px);
}

.feature-item-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.feature-item:hover .feature-item-icon {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: white;
  transform: scale(1.1) rotateZ(-5deg);
}

.feature-item-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature-item-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.75;
}

/* Modern Tabs */
.nav-tabs {
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.nav-tabs .nav-link {
  padding: 1rem 1.5rem;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-light);
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
  background: none;
}

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

.nav-tabs .nav-link.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}

/* Modern Accordion */
.accordion {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  cursor: pointer;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  transition: all 0.3s ease;
  font-weight: 600;
  color: var(--text-dark);
}

.accordion-header:hover {
  background: #f1f5f9;
  color: var(--primary-dark);
}

.accordion-header.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.1));
  color: var(--primary-dark);
}

.accordion-header i {
  transition: transform 0.3s ease;
}

.accordion-header.active i {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 1.5rem;
  background: white;
  color: var(--text-light);
  line-height: 1.75;
  display: none;
}

.accordion-body.show {
  display: block;
}

/* Modern Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #6366f1, transparent);
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 50%;
  padding-left: 2rem;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: 50%;
  padding-right: 2rem;
  text-align: right;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #e2e8f0;
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  border-color: #6366f1;
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.12);
}

.timeline-date {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.timeline-description {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Modern Stats */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: #6366f1;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12);
  transform: translateY(-8px);
}

.stat-number {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1 0%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Modern Badges */
.badge-modern {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.1));
  color: var(--primary-dark);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
}

.badge-modern:hover {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: white;
  border-color: transparent;
}

.badge-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(20, 184, 166, 0.1));
  color: #059669;
  border-color: rgba(16, 185, 129, 0.2);
}

.badge-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(244, 63, 94, 0.1));
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.2);
}

.badge-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 179, 8, 0.1));
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.2);
}

/* Modern Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
  margin: 2rem 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  color: var(--text-muted);
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Modern Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-item a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
  color: var(--primary-light);
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

.breadcrumb-item i {
  font-size: 0.8rem;
  color: var(--border-color);
}

/* Utility Classes */
.gradient-primary {
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  color: white;
}

.gradient-secondary {
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
  color: white;
}

.gradient-success {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  color: white;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #6366f1 0%, #0891b2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 0;
  }

  .timeline-item:nth-child(even) .timeline-content,
  .timeline-item:nth-child(odd) .timeline-content {
    margin-left: 3rem;
    margin-right: 0;
    padding-left: 1.5rem;
    padding-right: 0;
    text-align: left;
  }

  .timeline-marker {
    left: 0;
    transform: translateX(-8px);
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-container {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    gap: 1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .modern-card {
    background: #1e293b;
    border-color: #334155;
  }

  .modern-card:hover {
    border-color: #475569;
  }

  .feature-item {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }

  .feature-item:hover {
    border-color: #6366f1;
  }

  .feature-item-title {
    color: #f1f5f9;
  }

  .feature-item-description {
    color: #cbd5e1;
  }

  .accordion-header {
    background: #1e293b;
    color: #f1f5f9;
  }

  .accordion-header:hover {
    background: #334155;
  }

  .accordion-body {
    background: #1e293b;
    color: #cbd5e1;
  }

  .timeline-content {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
  }

  .stat-card {
    background: #1e293b;
    border-color: #334155;
  }
}
