/* ============================
   Hadoop Explorer - Custom CSS
   ============================ */

:root {
  --hadoop-dark: #1a1a2e;
  --hadoop-mid: #16213e;
  --hadoop-blue: #0f3460;
  --hadoop-gold: #e8a500;
  --hadoop-accent: #533483;
}

/* Sidebar customization */
.main-sidebar {
  box-shadow: 4px 0 20px rgba(0,0,0,0.4) !important;
}

.nav-sidebar .nav-item > .nav-link.active {
  background: linear-gradient(135deg, var(--hadoop-gold), #f4c842) !important;
  color: #1a1a2e !important;
  font-weight: 700;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link.active {
  background: rgba(232, 165, 0, 0.2) !important;
  color: var(--hadoop-gold) !important;
  border-left: 3px solid var(--hadoop-gold);
}

/* Cards enhancement */
.card {
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
}

/* Component cards on homepage */
.component-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s ease;
}

.component-card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-4px);
}

.component-card .card-body {
  padding: 1.5rem;
}

.component-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* Category section header */
.category-header {
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.category-header::before {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

.category-header::after {
  content: '';
  position: absolute;
  right: 30px;
  bottom: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

/* Component detail page */
.component-hero {
  background: linear-gradient(135deg, var(--hadoop-dark) 0%, var(--hadoop-blue) 100%);
  border-radius: 16px;
  padding: 35px;
  color: white;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}

.component-hero::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.component-hero .hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 35px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 20px;
}

/* Info boxes */
.info-box {
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

/* Code blocks */
pre {
  border-radius: 10px !important;
  margin: 0 !important;
}

.code-block {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
}

.code-header {
  background: #21252b;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-dots span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
}

/* Timeline for architecture */
.timeline-item-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Ecosystem map */
.eco-layer {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 15px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.eco-layer:hover {
  border-color: rgba(232, 165, 0, 0.4);
}

.eco-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.eco-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  text-decoration: none;
}

/* Search bar */
.search-wrapper {
  position: relative;
  margin-bottom: 30px;
}

.search-wrapper input {
  border-radius: 50px !important;
  padding: 12px 25px 12px 50px !important;
  font-size: 16px !important;
  border: 2px solid #e0e0e0 !important;
  transition: border-color 0.2s;
}

.search-wrapper input:focus {
  border-color: var(--hadoop-gold) !important;
  box-shadow: 0 0 0 0.2rem rgba(232,165,0,0.15) !important;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 18px;
}

/* Stats bar */
.stats-bar {
  background: linear-gradient(135deg, var(--hadoop-dark), var(--hadoop-blue));
  border-radius: 16px;
  padding: 25px;
  color: white;
  margin-bottom: 30px;
}

.stat-item {
  text-align: center;
  padding: 10px;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--hadoop-gold);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
}

/* Objective list */
.objective-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

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

.objective-bullet {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Use case box */
.use-case-box {
  background: linear-gradient(135deg, #f8f9ff, #eef2ff);
  border-left: 5px solid #533483;
  border-radius: 0 12px 12px 0;
  padding: 20px;
}

/* Nav breadcrumb */
.content-header {
  padding: 20px 20px 10px;
}

/* Comparaison table */
.comparison-table td, .comparison-table th {
  vertical-align: middle;
}

/* Badge animations */
.badge-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,165,0,0.4); }
  70% { box-shadow: 0 0 0 8px rgba(232,165,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,165,0,0); }
}

/* Position diagram */
.position-diagram {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e0e0e0;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 2;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* Content wrapper padding fix */
.content { padding: 20px; }

/* Responsive */
@media (max-width: 768px) {
  .stat-number { font-size: 24px; }
  .component-hero { padding: 20px; }
}
