/* ===== AI Navigation Styles ===== */
/* Unified with main site design system (base.html) */

:root {
  --ai-nav-primary: #667eea;
  --ai-nav-text-dark: #1a1a2e;
  --ai-nav-text-medium: #444;
  --ai-nav-text-soft: #555;
  --ai-nav-text-muted: #888;
  --ai-nav-text-light: #999;
  --ai-nav-surface: #fff;
  --ai-nav-secondary-surface: #f8f9fa;
  --ai-nav-border: #eee;
  --ai-nav-border-light: #e5e5e5;
  --ai-nav-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ai-nav-card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== Hero Section ===== */
.ai-nav-hero {
  background: var(--primary-gradient);
  color: #fff;
  padding: 3rem 0 2.5rem;
  border-radius: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ai-nav-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.ai-nav-hero > .container {
  position: relative;
  z-index: 1;
}

.ai-nav-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
  color: #fff;
}

.ai-nav-hero-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  position: relative;
}

/* ===== Search Bar ===== */
.ai-nav-search {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  position: relative;
}

.ai-nav-search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ai-nav-text-light);
  font-size: 1rem;
  z-index: 2;
}

.ai-nav-search-input {
  width: 100%;
  padding: 0.875rem 1.25rem 0.875rem 3rem;
  border: none;
  border-radius: 2rem;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  outline: none;
  transition: var(--transition-base);
  background: rgba(255, 255, 255, 0.95);
}

.ai-nav-search-input:focus {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* ===== Stats ===== */
.ai-nav-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  position: relative;
  color: rgba(255, 255, 255, 0.9);
}

.ai-nav-stat {
  font-size: 0.95rem;
}

/* ===== Category Tabs ===== */
.ai-nav-tabs-wrapper {
  background: var(--ai-nav-surface);
  border-bottom: 1px solid var(--ai-nav-border-light);
  padding: 0.75rem 0;
  margin-bottom: 2rem;
}

.ai-nav-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ai-nav-tabs-scroll {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ai-nav-tab {
  padding: 0.5rem 1.25rem;
  background: var(--ai-nav-tab-bg, #f5f5f5);
  border-radius: 2rem;
  font-size: 0.9rem;
  color: var(--ai-nav-text-soft);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-weight: 500;
}

.ai-nav-tab:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.ai-nav-tab.active {
  background: var(--primary-gradient);
  color: #fff;
}

.ai-nav-tab-wrapper {
  position: relative;
  display: inline-block;
}

/* ===== Subcategories Dropdown ===== */
.subcategories-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ai-nav-surface);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  min-width: 160px;
  z-index: 100;
  border: 1px solid var(--ai-nav-border);
}

.ai-nav-tab-wrapper:hover .subcategories-dropdown {
  display: block;
}

.subcategory-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--ai-nav-text-dark);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.subcategory-item:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

/* ===== Cards Grid ===== */
.ai-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.ai-nav-grid-subcat-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ai-nav-text-dark);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #667eea;
  display: inline-block;
}

.ai-nav-grid-subcat-title:first-child {
  margin-top: 0;
}

/* ===== Tool Card ===== */
.ai-nav-card {
  background: var(--ai-nav-surface);
  border-radius: 0.5rem;
  padding: 0.67rem;
  box-shadow: var(--ai-nav-card-shadow);
  transition: var(--transition-base);
  border: 1px solid var(--ai-nav-border);
  display: flex;
  flex-direction: column;
}

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

.ai-nav-card a {
  text-decoration: none;
}

.ai-nav-card-icon {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.33rem;
  flex-shrink: 0;
}

.ai-nav-card-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.ai-nav-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ai-nav-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.33rem;
  color: var(--ai-nav-text-dark);
}

.ai-nav-card-desc {
  font-size: 0.7rem;
  color: var(--ai-nav-text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.33rem;
  flex: 1;
}

.ai-nav-card-meta {
  display: flex;
  align-items: center;
  gap: 0.33rem;
  flex-wrap: wrap;
}

.ai-nav-card-tag {
  font-size: 0.6rem;
  padding: 0.17rem 0.5rem;
  border-radius: 1.33rem;
  font-weight: 500;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
  color: #333 !important;
}

/* Override Bootstrap bg-secondary for consistency */
.ai-nav-tab .badge.bg-secondary {
  background: var(--warning-gradient) !important;
  color: #333 !important;
}

.ai-nav-card-link {
  font-size: 0.7rem;
  color: #667eea;
  font-weight: 500;
  margin-left: auto;
}

/* ===== Empty State ===== */
.ai-nav-empty {
  text-align: center;
  padding: 3rem;
  color: var(--ai-nav-text-muted);
}

/* ===== Category Header ===== */
.ai-nav-category-header {
  text-align: center;
  margin-bottom: 2rem;
}

.ai-nav-category-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ai-nav-text-dark);
  margin-bottom: 0.5rem;
}

.ai-nav-category-desc {
  color: var(--ai-nav-text-muted);
  font-size: 1rem;
}

.ai-nav-category-count {
  margin-top: 1rem;
}

/* ===== Subcategory Headers ===== */
.ai-nav-subcat-headers {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid var(--ai-nav-border-light);
  margin-bottom: 1.5rem;
}

.ai-nav-subcat-header {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ai-nav-text-dark);
  margin: 0;
  padding: 0.5rem 1.25rem;
  background: var(--ai-nav-secondary-surface);
  border-radius: 1rem;
  border: 1px solid var(--ai-nav-border-light);
  transition: var(--transition-base);
}

.ai-nav-subcat-header:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

/* Subcategory tabs */
.ai-nav-subcat-tabs-wrapper {
  background: var(--ai-nav-surface);
  border-bottom: 1px solid var(--ai-nav-border-light);
  padding: 0.75rem 0;
}

.ai-nav-subcat-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ai-nav-subcat-tab {
  padding: 0.5rem 1.25rem;
  background: var(--ai-nav-secondary-surface);
  border-radius: 2rem;
  font-size: 0.9rem;
  color: var(--ai-nav-text-soft);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.ai-nav-subcat-tab:hover {
  background: var(--primary-gradient);
  color: #fff;
}

/* ===== Detail Page ===== */
.ai-nav-detail-card {
  background: var(--ai-nav-surface);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--ai-nav-card-shadow);
  border: 1px solid var(--ai-nav-border);
}

.ai-nav-detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.ai-nav-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.22) 0%, rgba(118, 75, 162, 0.22) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667eea;
  flex-shrink: 0;
}

.ai-nav-detail-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ai-nav-detail-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--ai-nav-text-dark);
}

.ai-nav-detail-desc {
  color: var(--ai-nav-text-muted);
  font-size: 1rem;
  margin: 0;
}

.ai-nav-detail-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ai-nav-detail-badge {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: 500;
}

/* Detail Content */
.ai-nav-detail-content {
  line-height: 1.8;
  color: var(--ai-nav-text-medium);
}

.ai-nav-detail-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--ai-nav-text-dark);
  border-left: 4px solid #667eea;
  padding-left: 1rem;
}

.ai-nav-detail-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--ai-nav-text-dark);
}

.ai-nav-detail-content ul {
  padding-left: 1.25rem;
}

.ai-nav-detail-content li {
  margin-bottom: 0.5rem;
}

.ai-nav-detail-content p {
  margin-bottom: 1rem;
}

/* ===== Sidebar ===== */
.ai-nav-detail-sidebar {
  position: sticky;
  top: 100px;
}

.ai-nav-sidebar-section {
  background: var(--ai-nav-surface);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--ai-nav-card-shadow);
  border: 1px solid var(--ai-nav-border);
  margin-bottom: 1rem;
}

.ai-nav-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--ai-nav-text-dark);
}

.ai-nav-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-nav-feature-list li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--ai-nav-text-soft);
  position: relative;
  padding-left: 1.5rem;
}

.ai-nav-feature-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  color: #28a745;
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .ai-nav-hero {
    padding: 2rem 0 1.5rem;
    border-radius: 1rem;
  }

  .ai-nav-hero-title {
    font-size: 1.75rem;
  }

  .ai-nav-grid {
    grid-template-columns: 1fr;
  }

  .ai-nav-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .ai-nav-tabs {
    gap: 0.35rem;
  }

  .ai-nav-tab {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
  }

  .ai-nav-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .ai-nav-detail-title {
    font-size: 1.5rem;
  }

  .ai-nav-detail-card {
    padding: 1.5rem;
  }
}

