/* ===================================
   SECTION-SPECIFIC COLOR SCHEMES
   =================================== */

/* NetWorkIsLifeR Package - Dark Purple */
.sidebar-item:has(a[href*="Package_"]) {
  border-left: 4px solid #6c5ce7;
  background: linear-gradient(90deg, rgba(108, 92, 231, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="Package_"]) a {
  color: #6c5ce7 !important;
  font-weight: 500;
}

/* DAFS - Data Science Track (R) - Blue */
.sidebar-item:has(a[href*="DAFS_prog"]),
.sidebar-item:has(a[href*="DAFS_DST"]),
.sidebar-item:has(a[href*="DAFS_exam"]),
.sidebar-item:has(a[href*="DAFS_TopicModel_R"]),
.sidebar-item:has(a[href*="DAFS_LexisUni"]):not(:has(a[href*="python"])) {
  border-left: 4px solid #0984e3;
  background: linear-gradient(90deg, rgba(9, 132, 227, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="DAFS_prog"]) a,
.sidebar-item:has(a[href*="DAFS_DST"]) a,
.sidebar-item:has(a[href*="DAFS_exam"]) a {
  color: #0984e3 !important;
  font-weight: 500;
}

/* DAFS - ESM track (Python) - Green */
.sidebar-item:has(a[href*="DAFS_install_Python"]),
.sidebar-item:has(a[href*="python"]) {
  border-left: 4px solid #00b894;
  background: linear-gradient(90deg, rgba(0, 184, 148, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="python"]) a {
  color: #00b894 !important;
  font-weight: 500;
}

/* DAFS - NLP - Orange */
.sidebar-item:has(a[href*="DAFS_NPL"]),
.sidebar-item:has(a[href*="DAFS_NLP"]),
.sidebar-item:has(a[href*="DAFS_Bertopic"]),
.sidebar-item:has(a[href*="Bertopic_metrics"]) {
  border-left: 4px solid #e17055;
  background: linear-gradient(90deg, rgba(225, 112, 85, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="DAFS_NLP"]) a,
.sidebar-item:has(a[href*="DAFS_Bertopic"]) a {
  color: #e17055 !important;
  font-weight: 500;
}

/* Network Analysis - Teal */
.sidebar-item:has(a[href*="Network_analysis"]),
.sidebar-item:has(a[href*="Text_networks"]):not(:has(a[href*="feature"])) {
  border-left: 4px solid #00cec9;
  background: linear-gradient(90deg, rgba(0, 206, 201, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="Network_analysis"]) a {
  color: #00cec9 !important;
  font-weight: 500;
}

/* Intro to Programming - Red */
.sidebar-item:has(a[href*="Intro_programming"]) {
  border-left: 4px solid #d63031;
  background: linear-gradient(90deg, rgba(214, 48, 49, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="Intro_programming"]) a {
  color: #d63031 !important;
  font-weight: 500;
}

/* Text Mining - Pink/Magenta */
.sidebar-item:has(a[href*="feature_extraction"]),
.sidebar-item:has(a[href*="Topic_modelling_lda"]),
.sidebar-item:has(a[href*="NER.html"]) {
  border-left: 4px solid #fd79a8;
  background: linear-gradient(90deg, rgba(253, 121, 168, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="feature_extraction"]) a,
.sidebar-item:has(a[href*="Topic_modelling_lda"]) a,
.sidebar-item:has(a[href*="NER.html"]) a {
  color: #fd79a8 !important;
  font-weight: 500;
}

/* State of Data - Gold */
.sidebar-item:has(a[href*="State_of_data"]) {
  border-left: 4px solid #fdcb6e;
  background: linear-gradient(90deg, rgba(253, 203, 110, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="State_of_data"]) a {
  color: #d4930f !important;
  font-weight: 500;
}

/* Topic Modelling Workshop - Indigo */
.sidebar-item:has(a[href*="Topic_modelling_bert"]) {
  border-left: 4px solid #a29bfe;
  background: linear-gradient(90deg, rgba(162, 155, 254, 0.05) 0%, transparent 100%);
}

.sidebar-item:has(a[href*="Topic_modelling_bert"]) a {
  color: #6c5ce7 !important;
  font-weight: 500;
}

/* ===================================
   SECTION HEADERS IN SIDEBAR
   =================================== */

.sidebar-section .sidebar-section-item {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

/* ===================================
   GENERAL MODERN STYLING
   =================================== */

/* Navbar gradient */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-brand, .navbar-nav .nav-link {
  color: white !important;
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Sidebar modern look */
.sidebar {
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
}

.sidebar-title {
  color: #6c5ce7;
  font-weight: 700;
  font-size: 1.3rem;
  padding: 1rem;
  background: white;
  border-bottom: 2px solid #e9ecef;
}

/* Main content area */
.quarto-title-block {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 2.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quarto-title {
  color: #2d3436;
  font-weight: 700;
}

/* Code blocks */
.sourceCode {
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Links */
a {
  transition: all 0.2s ease;
}

a:hover {
  transform: translateX(2px);
}

/* Search box */
#quarto-search {
  background: white;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

#quarto-search:focus-within {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .sidebar {
    position: static;
  }
}

/* Hover effects for sidebar items */
.sidebar-item {
  transition: all 0.2s ease;
  border-radius: 4px;
  margin: 2px 0;
}

.sidebar-item:hover {
  transform: translateX(4px);
}

/* Active page highlighting */
.sidebar-item.active {
  font-weight: 700;
}

.sidebar-item.active a {
  font-weight: 700 !important;
}