/* =========================================================
   SERVICES ENHANCEMENT - Enhanced Styling Foundation
   Building on existing BrandStyling.css
========================================================= */

/* Enhanced CSS Variables for Interactive Elements */
:root {
  /* Enhanced Animation Timings */
  --anim-fast: 0.15s;
  --anim-normal: 0.25s;
  --anim-slow: 0.4s;
  --anim-extra-slow: 0.6s;
  
  /* Enhanced Easing Functions */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Interactive Element Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Enhanced Shadow Levels */
  --shadow-interactive: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-elevated: 0 8px 24px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --shadow-floating: 0 12px 32px rgba(90,167,163,.22), 0 0 0 1px rgba(90,167,163,.35) inset;
  --shadow-glow: 0 0 20px rgba(90,167,163,.3);
  
  /* Interactive State Colors */
  --interactive-bg: rgba(90,167,163,.08);
  --interactive-bg-hover: rgba(90,167,163,.12);
  --interactive-border: rgba(90,167,163,.2);
  --interactive-border-hover: rgba(90,167,163,.35);
  
  /* Gradient Overlays for Interactive Elements */
  --gradient-interactive: radial-gradient(140px 80px at var(--mx,50%) var(--my,0%), rgba(90,167,163,.28), transparent 60%);
  --gradient-glow: radial-gradient(circle at center, rgba(90,167,163,.4), transparent 70%);
  
  /* Animation Delays for Staggered Effects */
  --stagger-1: 0.1s;
  --stagger-2: 0.2s;
  --stagger-3: 0.3s;
  --stagger-4: 0.4s;
  
  /* Mobile spacing adjustments */
  --mobile-spacing-xs: 0.125rem;
  --mobile-spacing-sm: 0.25rem;
  --mobile-spacing-md: 0.75rem;
  --mobile-spacing-lg: 1rem;
  --mobile-spacing-xl: 1.5rem;
  --mobile-spacing-2xl: 2rem;
  
  /* Mobile typography scale */
  --mobile-text-xs: 0.75rem;
  --mobile-text-sm: 0.875rem;
  --mobile-text-base: 1rem;
  --mobile-text-lg: 1.125rem;
  --mobile-text-xl: 1.25rem;
  --mobile-text-2xl: 1.5rem;
  
  /* Touch target sizes */
  --touch-target-minimum: 44px;
  --touch-target-comfortable: 48px;
}

/* =========================================================
   ENHANCED ANIMATION KEYFRAMES
========================================================= */

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(90,167,163,.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(90,167,163,.6);
  }
}

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

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes skeleton-loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* =========================================================
   ENHANCED INTERACTIVE CARD COMPONENTS
========================================================= */

.enhanced-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--spacing-lg);
  transition: 
    transform var(--anim-normal) var(--ease-out-quart),
    box-shadow var(--anim-normal) var(--ease-out-quart),
    border-color var(--anim-normal) var(--ease-out-quart);
  will-change: transform;
  overflow: hidden;
}

.enhanced-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: var(--gradient-interactive);
  opacity: 0;
  transition: opacity var(--anim-normal) var(--ease-out-quart);
}

.enhanced-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-floating);
  border-color: var(--interactive-border-hover);
}

.enhanced-card:hover::before {
  opacity: 1;
}

/* =========================================================
   SCROLL-TRIGGERED ANIMATIONS
========================================================= */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: 
    opacity var(--anim-slow) var(--ease-out-quart),
    transform var(--anim-slow) var(--ease-out-quart);
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.stagger-1 { transition-delay: var(--stagger-1); }
.animate-on-scroll.stagger-2 { transition-delay: var(--stagger-2); }
.animate-on-scroll.stagger-3 { transition-delay: var(--stagger-3); }
.animate-on-scroll.stagger-4 { transition-delay: var(--stagger-4); }

/* =========================================================
   ENHANCED BUTTON STYLES
========================================================= */

.btn-enhanced {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: 
    transform var(--anim-fast) var(--ease-out-quart),
    box-shadow var(--anim-fast) var(--ease-out-quart),
    background-color var(--anim-fast) var(--ease-out-quart);
  overflow: hidden;
}

.btn-enhanced::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,.1), transparent);
  transform: translateX(-100%);
  transition: transform var(--anim-normal) var(--ease-out-quart);
}

.btn-enhanced:hover::before {
  transform: translateX(100%);
}

.btn-enhanced:hover {
  transform: translateY(-2px);
}

.btn-enhanced.btn-primary {
  background: var(--primary);
  color: #0e1a24;
  box-shadow: 0 4px 14px rgba(90,167,163,.4);
}

.btn-enhanced.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(90,167,163,.5);
}

/* =========================================================
   INTERACTIVE METRIC COUNTER
========================================================= */

.metric-counter {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition: 
    opacity var(--anim-slow) var(--ease-out-quart),
    transform var(--anim-slow) var(--ease-out-quart);
}

.metric-counter.animate-in {
  opacity: 1;
  transform: translateY(0);
  animation: countUp var(--anim-slow) var(--ease-out-quart);
}

/* =========================================================
   PROGRESS BAR ANIMATION
========================================================= */

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  width: 0%;
  transition: width 1s var(--ease-out-quart);
  position: relative;
}

.progress-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

/* =========================================================
   EXPANDABLE SECTION STYLES
========================================================= */

.expandable-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--anim-normal) var(--ease-out-quart);
}

.expandable-header {
  padding: var(--spacing-lg);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color var(--anim-normal) var(--ease-out-quart);
}

.expandable-header:hover {
  background: var(--interactive-bg);
}

.expandable-icon {
  transition: transform var(--anim-normal) var(--ease-out-quart);
}

.expandable-section.expanded .expandable-icon {
  transform: rotate(180deg);
}

.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: 
    max-height var(--anim-slow) var(--ease-out-quart),
    padding var(--anim-slow) var(--ease-out-quart);
  padding: 0 var(--spacing-lg);
}

.expandable-section.expanded .expandable-content {
  max-height: 1000px;
  padding: var(--spacing-lg);
}

/* =========================================================
   AI KNOWLEDGE GRAPH STYLES
========================================================= */

.knowledge-graph-container {
  margin: 0;
  padding: var(--spacing-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
}

.knowledge-graph-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.knowledge-graph-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--spacing-sm);
}

.knowledge-graph-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.knowledge-graph-wrapper {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(90,167,163,0.02) 0%, 
    rgba(90,167,163,0.05) 50%, 
    rgba(90,167,163,0.02) 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.knowledge-graph-controls {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.graph-filter-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--anim-normal) var(--ease-out-quart);
}

.graph-filter-btn:hover {
  background: var(--interactive-bg);
  border-color: var(--interactive-border);
  transform: translateY(-1px);
}

.graph-filter-btn.active {
  background: var(--primary);
  color: #0e1a24;
  border-color: var(--primary);
}

.graph-node {
  cursor: pointer;
}

.graph-link {
  transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease;
}

.graph-tooltip {
  font-family: var(--font-sans);
  line-height: 1.4;
}

.knowledge-graph-legend {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.knowledge-graph-info {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--bg-muted);
  border-radius: 12px;
  text-align: center;
}

.knowledge-graph-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--spacing-sm);
}

.knowledge-graph-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================================
   BENTO BOX LAYOUT SYSTEM
========================================================= */

.content-section {
  margin: var(--spacing-2xl) 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out-quart) forwards;
}

.content-section:nth-child(1) { animation-delay: 0.1s; }
.content-section:nth-child(2) { animation-delay: 0.2s; }
.content-section:nth-child(3) { animation-delay: 0.3s; }
.content-section:nth-child(4) { animation-delay: 0.4s; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--spacing-sm);
  text-align: center;
  position: relative;
  transition: color var(--anim-normal) var(--ease-out-quart);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(90,167,163,0.6));
  border-radius: 2px;
  transition: width var(--anim-normal) var(--ease-out-quart);
}

.content-section:hover .section-title::after {
  width: 60px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  line-height: 1.6;
}

/* Bento Box Container */
.bento-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  grid-auto-rows: minmax(220px, auto);
  margin-top: var(--spacing-xl);
  position: relative;
}

@media (min-width: 768px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }
}

/* Individual Bento Box Component */
.bento-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: 
    transform var(--anim-normal) var(--ease-out-quart),
    box-shadow var(--anim-normal) var(--ease-out-quart),
    border-color var(--anim-normal) var(--ease-out-quart),
    background-color var(--anim-normal) var(--ease-out-quart);
  will-change: transform;
  cursor: pointer;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.bento-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-floating);
  border-color: var(--interactive-border-hover);
}

.bento-box::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, 
    rgba(90,167,163,0.1) 0%, 
    transparent 30%, 
    rgba(90,167,163,0.05) 70%, 
    transparent 100%);
  opacity: 0;
  transition: opacity var(--anim-normal) var(--ease-out-quart);
  z-index: -1;
  pointer-events: none;
}

.bento-box:hover::after {
  opacity: 1;
}

.bento-box:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  transform: translateY(-2px);
}

.bento-box[data-expanded="true"] {
  background: var(--bg-muted);
  border-color: var(--primary);
  box-shadow: 
    0 8px 32px rgba(90,167,163,.15),
    0 0 0 1px rgba(90,167,163,.2) inset;
  min-height: auto;
  z-index: 10;
  position: relative;
}

.bento-box[data-expanded="true"]::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, 
    rgba(90,167,163,.1) 0%, 
    transparent 50%, 
    rgba(90,167,163,.05) 100%);
  z-index: -1;
  opacity: 0.6;
}

/* Bento Box Header */
.bento-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: 
    background-color var(--anim-normal) var(--ease-out-quart),
    border-color var(--anim-normal) var(--ease-out-quart),
    padding var(--anim-normal) var(--ease-out-quart);
  position: relative;
  z-index: 2;
}

.bento-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  flex: 1;
  line-height: 1.3;
  transition: color var(--anim-normal) var(--ease-out-quart);
}

.bento-box[data-expanded="true"] .bento-header {
  background: rgba(90,167,163,.08);
  border-bottom-color: var(--border);
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
}

.bento-box[data-expanded="true"] .bento-header h3 {
  color: var(--primary);
}

/* Enhanced Expand Toggle Button */
.expand-toggle {
  background: var(--interactive-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--spacing-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: 
    color var(--anim-normal) var(--ease-out-quart),
    background-color var(--anim-normal) var(--ease-out-quart),
    border-color var(--anim-normal) var(--ease-out-quart),
    transform var(--anim-fast) var(--ease-out-quart);
  flex-shrink: 0;
}

.expand-toggle:hover {
  color: var(--primary);
  background-color: var(--interactive-bg-hover);
  border-color: var(--interactive-border);
  transform: scale(1.05);
}

.expand-toggle:active {
  transform: scale(0.95);
}

.expand-toggle:focus {
  outline: none;
  box-shadow: 
    0 0 0 2px var(--primary),
    0 0 0 4px rgba(90,167,163,0.2);
}

.expand-icon {
  transition: transform var(--anim-normal) var(--ease-out-quart);
  width: 20px;
  height: 20px;
}

.bento-box[data-expanded="true"] .expand-toggle {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #0e1a24;
}

.bento-box[data-expanded="true"] .expand-icon {
  transform: rotate(180deg);
}

/* Bento Box Preview Content */
.bento-preview {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  opacity: 1;
  transition: 
    opacity var(--anim-normal) var(--ease-out-quart),
    transform var(--anim-normal) var(--ease-out-quart);
  flex: 1;
  display: flex;
  align-items: flex-start;
}

.bento-preview p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
  font-size: 1rem;
}

/* Bento Box Expanded Content */
.bento-expanded {
  max-height: 0;
  overflow: hidden;
  transition: 
    max-height var(--anim-slow) var(--ease-out-quart),
    opacity var(--anim-normal) var(--ease-out-quart) 0.1s;
  padding: 0 var(--spacing-lg);
  opacity: 0;
}

.expanded-content {
  padding-bottom: var(--spacing-lg);
  padding-top: var(--spacing-md);
}

.bento-box[data-expanded="true"] .bento-preview {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.bento-box[data-expanded="true"] .bento-expanded {
  max-height: 2000px;
  opacity: 1;
  padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg);
}

/* Enhanced Visual Hierarchy for Expanded Content */
.expanded-content h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--spacing-md);
  line-height: 1.3;
  position: relative;
}

.expanded-content h4::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), rgba(90,167,163,0.4));
  border-radius: 1px;
  transition: width var(--anim-normal) var(--ease-out-quart);
}

.bento-box[data-expanded="true"] .expanded-content h4::after {
  width: 40px;
  animation: slideInWidth var(--anim-slow) var(--ease-out-quart) 0.3s;
}

@keyframes slideInWidth {
  from {
    width: 0;
  }
  to {
    width: 40px;
  }
}

.expanded-content > p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 var(--spacing-xl);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp var(--anim-slow) var(--ease-out-quart) 0.2s forwards;
}

/* Staggered Animation for Capability Items */
.capability-grid .capability-item {
  opacity: 0;
  transform: translateY(20px);
}

.bento-box[data-expanded="true"] .capability-item:nth-child(1) {
  animation: fadeInUp var(--anim-slow) var(--ease-out-quart) 0.4s forwards;
}

.bento-box[data-expanded="true"] .capability-item:nth-child(2) {
  animation: fadeInUp var(--anim-slow) var(--ease-out-quart) 0.5s forwards;
}

.bento-box[data-expanded="true"] .capability-item:nth-child(3) {
  animation: fadeInUp var(--anim-slow) var(--ease-out-quart) 0.6s forwards;
}

.bento-box[data-expanded="true"] .capability-item:nth-child(4) {
  animation: fadeInUp var(--anim-slow) var(--ease-out-quart) 0.7s forwards;
}

/* =========================================================
   MOBILE NAVIGATION STYLES
========================================================= */

/* Mobile Navigation Panel Styles */
.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: -100%;
  height: 100vh;
  width: min(85vw, 320px);
  background: var(--surface, #ffffff);
  border-left: 1px solid var(--border, #d1d5db);
  box-shadow: -8px 0 24px rgba(0,0,0,.15);
  transition: right 0.3s ease-out;
  z-index: 1000;
  overflow-y: auto;
}

.mobile-nav-panel.open {
  right: 0;
}

/* Mobile Sub-toggle (Learn, Services dropdowns) */
.mobile-sub-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--text, #e6f2f4);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
}

/* Separate clickable areas for navigation text and chevron */
.mobile-nav-text {
  flex: 1;
  padding: 0.75rem 1rem;
  color: var(--text, #e6f2f4);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.mobile-nav-text:hover {
  background: var(--interactive-bg, rgba(90,167,163,0.12));
  color: var(--primary, #5AA7A3);
}

.mobile-nav-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--text, #e6f2f4);
  cursor: pointer;
  min-width: 48px;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.mobile-nav-chevron:hover {
  background: var(--interactive-bg, rgba(90,167,163,0.12));
  color: var(--primary, #5AA7A3);
}

.mobile-nav-chevron .chev {
  font-size: 1.2rem;
  transition: transform 0.2s ease-out;
}

.mobile-sub-toggle.open .mobile-nav-chevron .chev {
  transform: rotate(90deg);
}

/* Mobile Submenu */
.mobile-submenu {
  display: none;
  padding: 0.5rem 0 1rem 1rem;
  margin-left: 1rem;
  border-left: 1px solid var(--border, rgba(255,255,255,0.1));
}

.mobile-submenu.open {
  display: block;
}

.mobile-submenu > a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-muted, #c3d3d8);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.mobile-submenu > a:hover {
  background: var(--interactive-bg, rgba(90,167,163,0.12));
  color: var(--primary, #5AA7A3);
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border, #d1d5db);
  background: var(--surface, #ffffff);
  color: var(--text, #1f2937);
  cursor: pointer;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.mobile-nav-toggle:hover {
  background: var(--interactive-bg, rgba(90,167,163,0.12));
}

/* Dark mode specific styles for services pages */
.services-dark .mobile-nav-panel {
  background: #0f2431;
  border-left-color: #244957;
}

.services-dark .mobile-nav-toggle {
  background: #1a3a4a;
  border-color: #244957;
  color: #e6f2f4;
}

.services-dark .mobile-nav-toggle:hover {
  background: rgba(90,167,163,0.12);
}

.services-dark .mobile-sub-toggle {
  color: #e6f2f4;
}

.services-dark .mobile-sub-toggle:hover {
  background: rgba(90,167,163,0.12);
  color: #5AA7A3;
}

.services-dark .mobile-submenu {
  background: rgba(16,40,54,0.8);
}

.services-dark .mobile-submenu > a {
  color: #c3d3d8;
}

.services-dark .mobile-submenu > a:hover {
  background: rgba(90,167,163,0.12);
  color: #5AA7A3;
}

/* =========================================================
   RESPONSIVE DESIGN OPTIMIZATIONS
========================================================= */

/* Mobile optimizations */
@media (max-width: 767px) {
  .content-section {
    margin: var(--mobile-spacing-xl) 0;
    padding: 0 var(--mobile-spacing-md);
  }
  
  .section-title {
    font-size: var(--mobile-text-xl);
    margin-bottom: var(--mobile-spacing-sm);
    text-align: center;
    line-height: 1.2;
  }
  
  .section-subtitle {
    font-size: var(--mobile-text-base);
    margin-bottom: var(--mobile-spacing-lg);
    padding: 0 var(--mobile-spacing-sm);
  }
  
  .bento-container {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-spacing-lg);
    margin-top: var(--mobile-spacing-lg);
  }
  
  .bento-box {
    min-height: 180px;
    border-radius: 12px;
    transform: none !important;
  }
  
  .bento-box:hover {
    transform: translateY(-1px);
  }
  
  .bento-header {
    padding: var(--mobile-spacing-lg);
    min-height: var(--touch-target-comfortable);
    display: flex;
    align-items: center;
  }
  
  .bento-header h3 {
    font-size: var(--mobile-text-lg);
    line-height: 1.3;
  }
  
  .expand-toggle {
    width: var(--touch-target-comfortable);
    height: var(--touch-target-comfortable);
    padding: var(--mobile-spacing-md);
    min-width: var(--touch-target-comfortable);
    min-height: var(--touch-target-comfortable);
  }
  
  .bento-preview {
    padding: 0 var(--mobile-spacing-lg) var(--mobile-spacing-lg);
  }
  
  .bento-preview p {
    font-size: var(--mobile-text-sm);
    line-height: 1.6;
  }
  
  .bento-expanded {
    padding: 0 var(--mobile-spacing-lg);
  }
  
  .expanded-content {
    padding-bottom: var(--mobile-spacing-xl);
    padding-top: var(--mobile-spacing-lg);
  }
  
  .enhanced-card {
    padding: var(--mobile-spacing-md);
  }
  
  .enhanced-card:hover {
    transform: translateY(-2px);
  }
  
  .btn-enhanced {
    padding: var(--mobile-spacing-sm) var(--mobile-spacing-md);
  }
  
  .metric-counter {
    font-size: 1.5rem;
  }
  
  .knowledge-graph-container {
    padding: var(--mobile-spacing-lg);
    margin: var(--mobile-spacing-lg) 0;
  }
  
  .knowledge-graph-controls {
    gap: var(--mobile-spacing-xs);
  }
  
  .graph-filter-btn {
    padding: var(--mobile-spacing-xs) var(--mobile-spacing-sm);
    font-size: 0.8rem;
  }
  
  .knowledge-graph-legend {
    gap: var(--mobile-spacing-md);
  }
  
  .legend-item {
    font-size: 0.8rem;
  }
  
  .mobile-nav-panel {
    width: 100vw;
    max-width: 100vw;
  }
  
  .mobile-nav-text, .mobile-nav-chevron {
    padding: 0.625rem 0.75rem;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
  
  .bento-box {
    min-height: 200px;
  }
}

/* Large screen optimizations */
@media (min-width: 1024px) {
  .bento-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }
  
  .bento-box {
    min-height: 220px;
  }
}

/* =========================================================
   ACCESSIBILITY ENHANCEMENTS
========================================================= */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .bento-box:hover {
    transform: none;
  }
  
  .enhanced-card:hover {
    transform: none;
  }
  
  .btn-enhanced:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bento-box {
    border-width: 2px;
  }
  
  .expand-toggle {
    border-width: 2px;
  }
  
  .btn-enhanced {
    border: 2px solid currentColor;
  }
}

/* Print styles */
@media print {
  .bento-box {
    break-inside: avoid;
    border: 2px solid #000;
    box-shadow: none;
    transform: none;
  }
  
  .expand-toggle {
    display: none;
  }
  
  .bento-expanded {
    max-height: none;
    opacity: 1;
    padding: var(--spacing-lg);
  }
  
  .mobile-nav-panel,
  .mobile-nav-toggle {
    display: none;
  }
}