/* =============================================================================
   Future Sciences Brand Guidelines - CSS following UI/UX Principles
   ============================================================================= */

/* =============================================================================
   1. CLARITY AND UNDERSTANDABILITY
   - Speak the user's language with clear typography
   - Minimize memory load with consistent visual cues
   - Self-explanatory design elements
   - Ensure legibility and clear organization
   ============================================================================= */

/* CSS Custom Properties for Design System */
:root {
  /* Color Palette - Named for clarity */
  --color-deep-ocean: #0A2342;
  --color-deep-space: #030B1A;
  --color-bordeaux: #8D2D56;
  --color-evergreen: #3A5A3A;
  --color-medium-gray: #6E6E6E;
  --color-light-gray: #F3F4F6;
  
  /* Typography Scale - Clear hierarchy */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing System - Consistent rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  
  /* Typography */
  --font-family-primary: 'IBM Plex Sans', sans-serif;
  --font-family-arabic: 'IBM Plex Sans Arabic', sans-serif;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Shadows for depth hierarchy */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 15px rgba(141, 45, 86, 0.4);
  
  /* Border radius for consistency */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Transitions for smooth interactions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 300ms ease-out;
  --transition-slow: 500ms ease-out;
}

/* =============================================================================
   2. EFFICIENCY AND FLEXIBILITY  
   - Responsive design for all devices
   - Customizable interface elements
   - Keyboard shortcuts and accessibility
   - Fast loading and smooth performance
   ============================================================================= */

/* Base Reset and Performance Optimizations */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Accessible base font size */
  line-height: var(--line-height-normal);
}

body {
  font-family: var(--font-family-primary);
  color: var(--color-medium-gray);
  background-color: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* RTL Support - Flexible for multiple languages */
html[dir="rtl"] body {
  font-family: var(--font-family-arabic);
}

/* =============================================================================
   3. USER CONTROL AND FORGIVENESS
   - Clear visual feedback for all interactions
   - Forgiving click targets and hover states
   - Clear escape routes and undo capabilities
   - Error prevention through good UX
   ============================================================================= */

/* Focus Management for Accessibility */
*:focus {
  outline: 2px solid var(--color-bordeaux);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip to main content for screen readers */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-bordeaux);
  color: white;
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-to-main:focus {
  top: 6px;
}

/* Enhanced Click Targets - Minimum 44px */
button,
a,
.interactive {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: var(--radius-md);
}

/* =============================================================================
   4. CONSISTENCY AND PREDICTABILITY
   - Consistent interaction patterns
   - Uniform spacing and typography
   - Predictable navigation behavior
   - Standard UI conventions
   ============================================================================= */

/* Enhanced Typography System with Color Palette */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  font-weight: 700;
  color: var(--color-deep-space);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
  position: relative;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: var(--font-family-arabic);
}

h1 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-8);
  padding: var(--space-4) var(--space-2);
  line-height: 1.4;
  background: linear-gradient(135deg, 
    var(--color-deep-space) 0%, 
    var(--color-bordeaux) 50%, 
    var(--color-deep-ocean) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  overflow: visible;
  word-wrap: break-word;
  hyphens: auto;
}

/* Enhanced RTL support for h1 */
html[dir="rtl"] h1 {
  padding: var(--space-6) var(--space-4);
  text-align: right;
  letter-spacing: 0.02em;
  margin: var(--space-4) 0 var(--space-8) 0;
}

/* Ensure Arabic text has proper rendering space */
.lang-ar {
  display: block;
  padding: var(--space-2) 0;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[dir="rtl"] .lang-ar {
  display: block;
  padding: var(--space-3) var(--space-2);
  min-height: 1.5em;
  overflow: visible;
}

/* Header section spacing for RTL */
html[dir="rtl"] header {
  margin-bottom: var(--space-16);
  padding: var(--space-6) var(--space-4);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-6);
  position: relative;
  padding-bottom: var(--space-4);
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--color-bordeaux) 0%, 
    var(--color-deep-ocean) 50%, 
    var(--color-evergreen) 100%);
  border-radius: 2px;
}

h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-4);
  color: var(--color-deep-ocean);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
  color: var(--color-bordeaux);
}

/* Enhanced section styling */
section {
  position: relative;
  padding: var(--space-8) 0;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(10, 35, 66, 0.1) 20%, 
    rgba(141, 45, 86, 0.2) 50%, 
    rgba(58, 90, 58, 0.1) 80%, 
    transparent 100%);
}

section:first-child::before {
  display: none;
}

/* Consistent Paragraph Spacing */
p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
  max-width: 65ch; /* Optimal reading length */
}

/* Enhanced Link Styles with Color Palette */
a {
  color: var(--color-bordeaux);
  text-decoration: none;
  position: relative;
  transition: all var(--transition-normal);
}

a:hover {
  color: var(--color-deep-ocean);
}

a[href]:hover {
  text-decoration: underline;
  text-decoration-color: var(--color-bordeaux);
  text-underline-offset: 3px;
}

/* Special link styling for external links */
a[href*="http"]::after {
  content: ' ↗';
  font-size: 0.8em;
  opacity: 0.7;
  transition: opacity var(--transition-normal);
}

a[href*="http"]:hover::after {
  opacity: 1;
}

/* =============================================================================
   5. FEEDBACK AND COMMUNICATION
   - Immediate visual feedback for interactions
   - Loading states and progress indicators
   - Clear system status communication
   - Informative hover and focus states
   ============================================================================= */

/* Enhanced Interactive States with Color Palette */
.nav-link,
.interactive-element {
  position: relative;
  padding: var(--space-3) var(--space-4);
  transition: all var(--transition-normal);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(141, 45, 86, 0.1) 0%, 
    rgba(10, 35, 66, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.nav-link:hover,
.interactive-element:hover {
  color: var(--color-bordeaux);
  transform: translateX(6px);
  background: rgba(10, 35, 66, 0.03);
}

.nav-link:hover::before {
  opacity: 1;
}

html[dir="rtl"] .nav-link:hover,
html[dir="rtl"] .interactive-element:hover {
  transform: translateX(-6px);
}

/* Enhanced Active States with Multi-Color Accent */
.nav-link.active {
  color: var(--color-deep-space);
  font-weight: 600;
  background: linear-gradient(135deg, 
    rgba(141, 45, 86, 0.15) 0%, 
    rgba(10, 35, 66, 0.1) 100%);
  border-radius: var(--radius-md);
  box-shadow: 
    0 2px 8px rgba(141, 45, 86, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-link.active::before {
  opacity: 1;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 4px;
  background: linear-gradient(180deg, 
    var(--color-bordeaux) 0%, 
    var(--color-deep-ocean) 50%, 
    var(--color-evergreen) 100%);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(141, 45, 86, 0.4);
}

html[dir="rtl"] .nav-link.active::after {
  left: auto;
  right: 0;
  border-radius: 2px 0 0 2px;
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-light-gray);
  border-top: 2px solid var(--color-bordeaux);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Toast Notifications with Color Palette */
.toast {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  background: linear-gradient(135deg, 
    var(--color-deep-space) 0%, 
    var(--color-deep-ocean) 100%);
  color: white;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 10px 30px rgba(10, 35, 66, 0.3),
    0 4px 15px rgba(141, 45, 86, 0.2);
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition: all var(--transition-normal);
  z-index: 1000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(141, 45, 86, 0.2);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    var(--color-bordeaux) 0%, 
    var(--color-evergreen) 100%);
}

html[dir="rtl"] .toast {
  left: var(--space-8);
  right: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =============================================================================
   6. AESTHETIC AND PURPOSEFUL DESIGN
   - Clean, minimal interface
   - Purposeful use of color and space
   - Thoughtful typography and layout
   - Beautiful, functional design
   ============================================================================= */

/* Layout Structure */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Enhanced Body Background with Subtle Gradient */
body {
  background: linear-gradient(135deg, 
    rgba(10, 35, 66, 0.02) 0%, 
    rgba(141, 45, 86, 0.01) 50%, 
    rgba(58, 90, 58, 0.02) 100%);
  min-height: 100vh;
}

/* Sidebar Navigation with Deep Ocean Accent */
.sidebar {
  background: linear-gradient(180deg, 
    rgba(243, 244, 246, 0.95) 0%, 
    rgba(10, 35, 66, 0.05) 100%);
  backdrop-filter: blur(15px);
  border-right: 2px solid rgba(10, 35, 66, 0.1);
  transition: all var(--transition-normal);
  box-shadow: 4px 0 20px rgba(10, 35, 66, 0.08);
}

html[dir="rtl"] .sidebar {
  border-left: 2px solid rgba(10, 35, 66, 0.1);
  border-right: none;
  box-shadow: -4px 0 20px rgba(10, 35, 66, 0.08);
}

/* Cards and Content Sections with Color Palette Integration */
.content-card {
  background: linear-gradient(145deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(10, 35, 66, 0.02) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: 
    0 4px 20px rgba(10, 35, 66, 0.08),
    0 1px 3px rgba(141, 45, 86, 0.05);
  border: 1px solid rgba(10, 35, 66, 0.1);
  transition: all var(--transition-normal);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--color-bordeaux) 0%, 
    var(--color-deep-ocean) 50%, 
    var(--color-evergreen) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.content-card:hover {
  box-shadow: 
    0 8px 30px rgba(10, 35, 66, 0.15),
    0 4px 12px rgba(141, 45, 86, 0.1);
  transform: translateY(-4px);
}

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

/* Enhanced Color Palette Cards */
.color-card {
  cursor: pointer;
  transition: all var(--transition-normal);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(10, 35, 66, 0.1);
  position: relative;
  overflow: hidden;
}

.color-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, 
    rgba(141, 45, 86, 0.05) 0%, 
    transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 1;
}

.color-card:hover {
  transform: translateY(-6px);
  box-shadow: 
    0 12px 40px rgba(10, 35, 66, 0.15),
    0 4px 12px rgba(141, 45, 86, 0.1);
  border-color: rgba(141, 45, 86, 0.2);
}

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

.color-card .color-swatch {
  width: 100%;
  height: 128px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 2;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.color-card:hover .color-swatch {
  transform: scale(1.02);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Enhance color swatches with gradients */
.color-swatch::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, 
      rgba(255, 255, 255, 0.15) 0%, 
      transparent 50%, 
      rgba(0, 0, 0, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.color-card:hover .color-swatch::after {
  opacity: 1;
}

/* Individual color swatch enhancements */
.bg-deep-ocean {
  background: linear-gradient(135deg, #0A2342 0%, #0F2A4A 100%);
}

.bg-deep-space {
  background: linear-gradient(135deg, #030B1A 0%, #0A1425 100%);
}

.bg-bordeaux {
  background: linear-gradient(135deg, #8D2D56 0%, #A03562 100%);
}

.bg-evergreen {
  background: linear-gradient(135deg, #3A5A3A 0%, #456645 100%);
}

/* =============================================================================
   7. USER-CENTRIC AND EMPATHETIC DESIGN
   - Accessible design for all users
   - Respectful of user preferences
   - Honest and transparent interface
   - Delightful micro-interactions
   ============================================================================= */

/* Accessibility Enhancements */
@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;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-medium-gray: #000000;
    --color-light-gray: #FFFFFF;
  }
  
  .content-card {
    border: 2px solid var(--color-deep-space);
  }
}

/* Dark Mode Respect */
@media (prefers-color-scheme: dark) {
  :root {
    --color-medium-gray: #E5E7EB;
    --color-light-gray: #1F2937;
  }
  
  body {
    background-color: var(--color-deep-space);
    color: var(--color-medium-gray);
  }
  
  .content-card {
    background: rgba(26, 32, 46, 0.9);
    border-color: rgba(75, 85, 99, 0.3);
  }
}

/* Language Switching - Smooth Transitions */
.lang-content {
  transition: opacity var(--transition-normal);
}

.lang-content.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Enhanced Language Switcher with Color Palette */
.lang-switcher button {
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all var(--transition-normal);
  position: relative;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.lang-switcher button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(141, 45, 86, 0.08) 0%, 
    rgba(10, 35, 66, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.lang-switcher button:hover {
  border-color: rgba(141, 45, 86, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 35, 66, 0.15);
}

.lang-switcher button:hover::before {
  opacity: 1;
}

.lang-switcher button.active {
  background: linear-gradient(135deg, 
    var(--color-bordeaux) 0%, 
    var(--color-deep-ocean) 100%);
  color: white;
  border-color: var(--color-deep-ocean);
  box-shadow: 
    0 4px 15px rgba(141, 45, 86, 0.4),
    0 2px 8px rgba(10, 35, 66, 0.2);
  transform: translateY(-1px);
}

.lang-switcher button.active::before {
  opacity: 0;
}

/* =============================================================================
   8. ROBUST AND ENDURING DESIGN
   - Cross-browser compatibility
   - Scalable and maintainable code
   - Performance optimized
   - Future-proof architecture
   ============================================================================= */

/* Progressive Enhancement */
.js-enhanced {
  display: none;
}

.js .js-enhanced {
  display: block;
}

.no-js .js-fallback {
  display: block;
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: all var(--transition-normal);
}

.logo-image {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: all var(--transition-normal);
}

.logo-image:hover {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  transform: scale(1.02);
}

/* Responsive Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.25rem;
    --font-size-4xl: 1.875rem;
    --font-size-3xl: 1.5rem;
  }
  
  /* Enhanced mobile spacing for Arabic text */
  h1 {
    padding: var(--space-6) var(--space-4);
    line-height: 1.3;
    margin-bottom: var(--space-6);
  }
  
  html[dir="rtl"] h1 {
    padding: var(--space-8) var(--space-6);
    margin: var(--space-6) 0 var(--space-8) 0;
  }
  
  html[dir="rtl"] .lang-ar {
    padding: var(--space-4) var(--space-3);
    min-height: 2em;
  }
  
  html[dir="rtl"] header {
    padding: var(--space-8) var(--space-6);
    margin-bottom: var(--space-12);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    z-index: 1000;
    transition: left var(--transition-normal);
  }
  
  html[dir="rtl"] .sidebar {
    left: auto;
    right: -300px;
    transition: right var(--transition-normal);
  }
  
  .sidebar.open {
    left: 0;
  }
  
  html[dir="rtl"] .sidebar.open {
    right: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .content-card {
    padding: var(--space-6);
  }
  
  /* Extra small screen spacing for Arabic text */
  h1 {
    padding: var(--space-8) var(--space-6);
    font-size: 2rem;
    line-height: 1.2;
  }
  
  html[dir="rtl"] h1 {
    padding: var(--space-12) var(--space-8);
    margin: var(--space-8) 0;
  }
  
  html[dir="rtl"] .lang-ar {
    padding: var(--space-6) var(--space-4);
    min-height: 2.5em;
  }
  
  html[dir="rtl"] header {
    padding: var(--space-12) var(--space-8);
  }
}

/* Print Styles for Documentation */
@media print {
  .sidebar,
  .toast,
  .lang-switcher {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
  
  .content-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Custom Scrollbar - Aesthetic Enhancement */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--color-medium-gray);
  border-radius: var(--radius-sm);
  transition: background var(--transition-normal);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-bordeaux);
}

/* Selection Styling */
::selection {
  background: rgba(141, 45, 86, 0.2);
  color: var(--color-deep-space);
}

/* Utility Classes for Common Patterns */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Enhanced Icon Styling with Color Palette */
svg {
  transition: all var(--transition-normal);
}

.iconography svg:hover {
  color: var(--color-deep-ocean) !important;
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(141, 45, 86, 0.3));
}

/* Logo Image Enhancements */
.logo-image {
  filter: drop-shadow(0 4px 12px rgba(10, 35, 66, 0.15));
  transition: all var(--transition-normal);
}

.logo-image:hover {
  filter: 
    drop-shadow(0 8px 20px rgba(10, 35, 66, 0.2))
    drop-shadow(0 4px 8px rgba(141, 45, 86, 0.1));
  transform: scale(1.02);
}

/* Animation Classes */
.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

.slide-up {
  animation: slideUp var(--transition-normal) ease-out;
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Color-themed pulse animation */
.pulse-bordeaux {
  animation: pulseBordeaux 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.pulse-ocean {
  animation: pulseOcean 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulseBordeaux {
  0%, 100% { 
    opacity: 1; 
    box-shadow: 0 0 0 0 rgba(141, 45, 86, 0.4);
  }
  50% { 
    opacity: 0.8; 
    box-shadow: 0 0 0 10px rgba(141, 45, 86, 0);
  }
}

@keyframes pulseOcean {
  0%, 100% { 
    opacity: 1; 
    box-shadow: 0 0 0 0 rgba(10, 35, 66, 0.4);
  }
  50% { 
    opacity: 0.8; 
    box-shadow: 0 0 0 10px rgba(10, 35, 66, 0);
  }
}

/* Error States and Validation */
.error {
  color: #DC2626;
  border-color: #DC2626;
}

.success {
  color: #059669;
  border-color: #059669;
}

.warning {
  color: #D97706;
  border-color: #D97706;
}

/* Status Indicators */
.status-indicator {
  position: relative;
  display: inline-block;
}

.status-indicator::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-bordeaux);
  animation: pulse 2s infinite;
}

/* Interactive Feedback Enhancement */
.interactive-feedback {
  position: relative;
  overflow: hidden;
}

.interactive-feedback::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(141, 45, 86, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--transition-fast), height var(--transition-fast);
}

.interactive-feedback:active::before {
  width: 300px;
  height: 300px;
} 