/* ==========================================================================
   Professional Neumorphic CSS Framework
   Purple & Yellow Theme with Mobile-First Design System
   ========================================================================== */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (CSS Variables)
   ========================================================================== */

:root {
  /* Primary Color Palette */
  --primary-purple: #7c3aed;
  --primary-purple-light: #8b5cf6;
  --primary-purple-dark: #6d28d9;
  --primary-purple-pale: #ede9fe;
  --primary-purple-soft: #f3f0ff;
  
  /* Accent Color Palette */
  --accent-yellow: #fcd34d;
  --accent-yellow-light: #fde68a;
  --accent-yellow-dark: #f59e0b;
  --accent-yellow-pale: #fef3c7;
  --accent-yellow-soft: #fffbeb;

  /* Neutral Color System */
  --neu-base: #e9e4f0;
  --neu-base-dark: #d4cce0;
  --neu-light: #f5f3f7;
  --neu-white: #ffffff;
  --neu-gray-100: #fafafa;
  --neu-gray-200: #f0edf4;
  --neu-gray-300: #d1c9db;
  --neu-gray-400: #a59bb3;
  --neu-gray-500: #7e718f;
  --neu-gray-600: #5c5070;
  --neu-gray-700: #3d334f;
  --neu-gray-800: #2a2338;
  --neu-gray-900: #1a1525;

  /* RGB Values for Transparency */
  --primary-purple-rgb: 124, 58, 237;
  --accent-yellow-rgb: 252, 211, 77;
  --neu-base-rgb: 233, 228, 240;
  --neu-gray-900-rgb: 26, 21, 37;

  /* Semantic Color Tokens */
  --color-background: var(--neu-base);
  --color-surface: var(--neu-light);
  --color-text: var(--neu-gray-800);
  --color-text-secondary: var(--neu-gray-600);
  --color-primary: var(--primary-purple);
  --color-primary-hover: var(--primary-purple-light);
  --color-primary-active: var(--primary-purple-dark);
  --color-border: rgba(var(--primary-purple-rgb), 0.1);
  --color-error: #dc2626;
  --color-success: var(--primary-purple);
  --color-warning: var(--accent-yellow-dark);
  --color-info: var(--neu-gray-500);

  /* Background Variations */
  --color-bg-1: rgba(124, 58, 237, 0.08);
  --color-bg-2: rgba(252, 211, 77, 0.08);
  --color-bg-3: rgba(124, 58, 237, 0.05);
  --color-bg-8: rgba(233, 228, 240, 0.5);

  /* Interactive States */
  --color-secondary: rgba(var(--primary-purple-rgb), 0.12);
  --color-secondary-hover: rgba(var(--primary-purple-rgb), 0.2);
  --color-focus-ring: rgba(var(--primary-purple-rgb), 0.4);

  /* Neumorphic Shadow System */
  --shadow-small: 
    3px 3px 6px rgba(174, 169, 189, 0.4),
    -3px -3px 6px rgba(255, 255, 255, 0.8);
  
  --shadow-medium: 
    6px 6px 12px rgba(174, 169, 189, 0.4),
    -6px -6px 12px rgba(255, 255, 255, 0.8);
  
  --shadow-large: 
    10px 10px 20px rgba(174, 169, 189, 0.4),
    -10px -10px 20px rgba(255, 255, 255, 0.8);
  
  --shadow-inset: 
    inset 4px 4px 8px rgba(174, 169, 189, 0.4),
    inset -4px -4px 8px rgba(255, 255, 255, 0.8);
  
  --shadow-inset-small:
    inset 2px 2px 4px rgba(174, 169, 189, 0.4),
    inset -2px -2px 4px rgba(255, 255, 255, 0.8);
  
  --shadow-colored-purple:
    4px 4px 16px rgba(124, 58, 237, 0.15),
    -3px -3px 7px rgba(255, 255, 255, 0.9);
  
  --shadow-colored-yellow:
    8px 8px 16px rgba(252, 211, 77, 0.2),
    -8px -8px 16px rgba(255, 255, 255, 0.9);

  /* Typography Scale - Mobile First */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.025em;

  /* Spacing Scale - Mobile Friendly */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */

  /* Border Radius Scale */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-base: 0.75rem; /* 12px */
  --radius-md: 1rem;      /* 16px */
  --radius-lg: 1.25rem;   /* 20px */
  --radius-full: 9999px;

  /* Animation Properties */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Layout Breakpoints */
  --container-xs: 20rem;    /* 320px */
  --container-sm: 40rem;    /* 640px */
  --container-md: 48rem;    /* 768px */
  --container-lg: 64rem;    /* 1024px */
  --container-xl: 80rem;    /* 1280px */

  /* Sidebar */
  --sidebar-width: 18rem; /* 288px */

  /* Focus States */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
}

/* Mobile-specific shadow adjustments */
@media (max-width: 48rem) {
  :root {
    --shadow-small: 
      2px 2px 4px rgba(174, 169, 189, 0.3),
      -2px -2px 4px rgba(255, 255, 255, 0.7);
    
    --shadow-medium: 
      4px 4px 8px rgba(174, 169, 189, 0.3),
      -4px -4px 8px rgba(255, 255, 255, 0.7);
    
    --shadow-large: 
      4px 4px 8px rgba(174, 169, 189, 0.3),
      -3px -3px 6px rgba(255, 255, 255, 0.7);
      
    --sidebar-width: 100%;
  }
}

/* ==========================================================================
   DARK MODE CONFIGURATION
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --neu-base: #1f1b2e;
    --neu-base-dark: #161321;
    --neu-light: #252137;
    --neu-white: #2d2842;
    
    --color-background: var(--neu-base);
    --color-surface: var(--neu-light);
    --color-text: #f3f0ff;
    --color-text-secondary: #c4b5fd;
    
    --shadow-small: 
      3px 3px 6px rgba(13, 11, 20, 0.6),
      -3px -3px 6px rgba(35, 31, 50, 0.5);
    
    --shadow-medium: 
      6px 6px 12px rgba(13, 11, 20, 0.6),
      -6px -6px 12px rgba(35, 31, 50, 0.5);
    
    --shadow-large: 
      10px 10px 20px rgba(13, 11, 20, 0.6),
      -10px -10px 20px rgba(35, 31, 50, 0.5);
    
    --shadow-inset: 
      inset 4px 4px 8px rgba(13, 11, 20, 0.6),
      inset -4px -4px 8px rgba(35, 31, 50, 0.5);
  }
}

[data-color-scheme="dark"] {
  --neu-base: #1f1b2e;
  --neu-light: #252137;
  --color-background: var(--neu-base);
  --color-surface: var(--neu-light);
  --color-text: #f3f0ff;
  --color-text-secondary: #c4b5fd;
}

/* ==========================================================================
   BASE STYLES & TYPOGRAPHY
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

/* Desktop typography */
@media (min-width: 48rem) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
  h3 { font-size: var(--font-size-2xl); }
  h4 { font-size: var(--font-size-xl); }
  h5 { font-size: var(--font-size-lg); }
  h6 { font-size: var(--font-size-base); }
}

p {
  margin: 0 0 var(--space-4) 0;
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

/* Code Styling */
code, pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-2);
}

pre {
  padding: var(--space-4);
  margin: var(--space-4) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* ==========================================================================
   BUTTON COMPONENTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-small);
  overflow: hidden;
  min-height: 40px; /* iOS touch target */
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-inset-small);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-medium);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Button Variants */
.btn--primary {
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light));
  color: var(--neu-white);
  box-shadow: var(--shadow-colored-purple);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-purple-light), var(--primary-purple));
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--color-secondary-hover);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  box-shadow: var(--shadow-small);
}

.btn--outline:hover:not(:disabled) {
  background: var(--color-secondary);
  border-color: var(--color-primary);
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-yellow-light));
  color: var(--neu-gray-900);
  box-shadow: var(--shadow-colored-yellow);
}

/* Button Sizes */
.btn--sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  min-height: 36px;
}

.btn--lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
  min-height: 52px;
}

.btn--full-width {
  width: 100%;
}

/* Mobile button adjustments */
@media (max-width: 48rem) {
  .btn {
    padding: var(--space-3) var(--space-2);
    font-size: var(--font-size-base);
  }
  
  .btn--sm {
    padding: var(--space-2) var(--space-4);
  }
  
  .btn--lg {
    padding: var(--space-4) var(--space-8);
  }
}

/* ==========================================================================
   FORM COMPONENTS
   ========================================================================== */

.form-control {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-inset-small);
  transition: all var(--duration-normal) var(--ease-standard);
  font-family: inherit;
  appearance: none;
  min-height: 44px; /* iOS touch target */
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-inset-small), 0 0 0 4px rgba(var(--primary-purple-rgb), 0.1);
  background-color: var(--color-surface);
}

.form-control::placeholder {
  color: var(--color-text-secondary);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  padding-right: var(--space-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 16px;
  cursor: pointer;
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.form-group {
  margin-bottom: var(--space-5);
}

/* Mobile form adjustments */
@media (max-width: 48rem) {
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: var(--space-4);
  }
  
  select.form-control {
    padding-right: var(--space-12);
  }
}

/* ==========================================================================
   CARD COMPONENTS
   ========================================================================== */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-purple), var(--accent-yellow));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-standard);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-large);
}

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

.card--inset {
  box-shadow: var(--shadow-inset);
  background: var(--color-background);
}

.card__body {
  padding: var(--space-5);
}

.card__header,
.card__footer {
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.card__footer {
  border-bottom: none;
  border-top: 1px solid var(--color-border);
}

/* Mobile card adjustments */
@media (max-width: 48rem) {
  .card {
    border-radius: var(--radius-base);
  }
  
  .card__body,
  .card__header,
  .card__footer {
    padding: var(--space-4);
  }
  
  .card:hover {
    transform: translateY(-2px);
  }
}

/* ==========================================================================
   ICON COMPONENTS & SIZING
   ========================================================================== */

/* Base icon styling */
.icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
  transition: all var(--duration-fast) var(--ease-standard);
}

/* Icon sizes */
.icon--xs {
  width: 1rem;
  height: 1rem;
}

.icon--sm {
  width: 1.25rem;
  height: 1.25rem;
}

.icon--md {
  width: 1.5rem;
  height: 1.5rem;
}

.icon--lg {
  width: 2rem;
  height: 2rem;
}

.icon--xl {
  width: 2.5rem;
  height: 2.5rem;
}

.icon--2xl {
  width: 3rem;
  height: 3rem;
}

.icon--3xl {
  width: 4rem;
  height: 4rem;
}

/* WhatsApp specific icon styling */
.whatsapp-icon {
  color: #25d366; /* WhatsApp green */
  transition: all var(--duration-normal) var(--ease-standard);
}

.whatsapp-icon:hover {
  color: #128c7e; /* Darker WhatsApp green */
  transform: scale(1.1);
}

/* WhatsApp icon sizes - specific classes */
.whatsapp-icon--xs {
  width: 1rem;
  height: 1rem;
  font-size: 1rem;
}

.whatsapp-icon--sm {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 1.25rem;
}

.whatsapp-icon--md {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.5rem;
}

.whatsapp-icon--lg {
  width: 2rem;
  height: 2rem;
  font-size: 2rem;
}

.whatsapp-icon--xl {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 2.5rem;
}

.whatsapp-icon--2xl {
  width: 3rem;
  height: 3rem;
  font-size: 3rem;
}

.whatsapp-icon--3xl {
  width: 4rem;
  height: 4rem;
  font-size: 4rem;
}

/* Custom size utility - use with CSS variables */
.whatsapp-icon--custom {
  width: var(--whatsapp-size, 1.5rem);
  height: var(--whatsapp-size, 1.5rem);
  font-size: var(--whatsapp-size, 1.5rem);
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 3.5rem;
  height: 3.5rem;
  background: #25d366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-large);
  z-index: 100;
  transition: all var(--duration-normal) var(--ease-bounce);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.whatsapp-float:hover {
  background: #128c7e;
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-float .icon {
  color: white;
  font-size: 1rem;
}

/* Mobile WhatsApp float adjustments */
@media (max-width: 48rem) {
  .whatsapp-float {
    width: 2rem;
    height: 2rem;
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  .whatsapp-float .icon {
    font-size: 1.5rem;
  }
}

/* Social icons group */
.social-icons {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-standard);
  text-decoration: none;
  box-shadow: var(--shadow-small);
}

.social-icon--whatsapp {
  background: #25d366;
  color: white;
}

.social-icon--whatsapp:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: var(--shadow-small);
}

/* Mobile social icons */
@media (max-width: 48rem) {
  .social-icons {
    gap: var(--space-2);
  }
  
  .social-icon {
    width: 2rem;
    height: 2rem;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  box-shadow: var(--shadow-small);
  min-height: 32px;
}

.status--success {
  background-color: rgba(var(--primary-purple-rgb), 0.15);
  color: var(--color-success);
  border: 1px solid rgba(var(--primary-purple-rgb), 0.25);
}

.status--error {
  background-color: rgba(220, 38, 38, 0.15);
  color: var(--color-error);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.status--warning {
  background-color: rgba(var(--accent-yellow-rgb), 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(var(--accent-yellow-rgb), 0.25);
}

.status--info {
  background-color: rgba(126, 113, 143, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(126, 113, 143, 0.25);
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 40rem) {
  .container {
    max-width: var(--container-sm);
  }
}

@media (min-width: 48rem) {
  .container {
    max-width: var(--container-md);
  }
}

@media (min-width: 64rem) {
  .container {
    max-width: var(--container-lg);
  }
}

@media (min-width: 80rem) {
  .container {
    max-width: var(--container-xl);
  }
}

/* ==========================================================================
   HEADER COMPONENT
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto;
  min-height: 4rem;
  padding: var(--space-3) 0;
  background: rgba(var(--neu-base-rgb), 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-small);
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.menu-toggle {
  background: var(--color-surface);
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  color: var(--color-text);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-small);
  transition: all var(--duration-fast) var(--ease-standard);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  background: var(--color-secondary);
  transform: scale(1.05);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex-shrink: 1;
}

.logo h1 {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  margin: 0;
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-img {
  height: auto;
  width: auto;
  max-width: 15rem;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-shrink: 0;
}

/* Mobile header adjustments */
@media (max-width: 48rem) {
  .header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: var(--space-2) 0;
    min-height: 3.5rem;
  }
  
  .header-content {
    gap: var(--space-2);
  }
  
  .header-left {
    gap: var(--space-2);
  }
  
  .logo h1 {
    font-size: var(--font-size-base);
  }
  
  .logo p {
    font-size: 0.625rem; /* 10px */
  }
  
  .logo-img {
    height: auto;
    max-width: 15rem;
  }
  
  .header-actions .btn {
    font-size: var(--font-size-xs);
    padding: var(--space-2) var(--space-3);
  }
  
  /* Add space for fixed header */
  .main-content {
    padding-top: 3.5rem;
  }
}

@media (max-width: 30rem) {
  .header {
    min-height: 3rem;
  }
  
  .header-actions {
    gap: var(--space-1);
  }
  
  .header-actions .btn {
    font-size: 0.625rem; /* 10px */
    padding: var(--space-1) var(--space-2);
    min-height: 32px;
  }
  
  .main-content {
    padding-top: 3rem;
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--color-bg-1), var(--color-bg-3));
  padding: var(--space-8) 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 50rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
  color: var(--color-text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  line-height: var(--line-height-normal);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Desktop hero */
@media (min-width: 48rem) {
  .hero {
    padding: var(--space-12) 0;
  }
  
  .hero h1 {
    font-size: var(--font-size-4xl);
  }
  
  .hero p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-8);
  }
}

/* Mobile hero adjustments */
@media (max-width: 48rem) {
  .hero {
    padding: var(--space-12) 0;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 16rem;
  }
}

/* ==========================================================================
   COURSE COMPONENTS
   ========================================================================== */

.courses {
  padding: var(--space-8) 0;
  background: var(--color-background);
}

.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 48rem) {
  .courses-grid {
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: var(--space-6);
  }
}

.course-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-5);
  box-shadow: var(--shadow-small);
  transition: all var(--duration-normal) var(--ease-standard);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-purple), var(--accent-yellow));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-standard);
}

.course-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-large);
}

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

.course-header {
  margin-bottom: var(--space-4);
}

.course-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
  color: var(--color-text);
  line-height: var(--line-height-tight);
}

.course-subtitle {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: var(--font-size-sm);
}

.course-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (min-width: 48rem) {
  .course-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.meta-icon {
  width: 1rem;
  height: 1rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

.course-highlights {
  margin-bottom: var(--space-4);
}

.course-highlights h4 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.highlight-tag {
  background: var(--color-secondary);
  color: var(--color-text);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-small);
  white-space: nowrap;
}

.course-addons {
  margin-bottom: var(--space-5);
}

.course-addons h4 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-2);
  color: var(--color-success);
}

.addon-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.addon-list li {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding: var(--space-1) 0;
  position: relative;
  padding-left: var(--space-4);
}

.addon-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: var(--font-weight-bold);
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.course-fee {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

/* Mobile course adjustments */
@media (max-width: 48rem) {
  .course-card {
    padding: var(--space-4);
    border-radius: var(--radius-base);
  }
  
  .course-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .course-footer .btn {
    width: 100%;
  }
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */

.features {
  padding: var(--space-8) 0;
  background: var(--color-bg-8);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 48rem) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
    gap: var(--space-6);
  }
}

.feature-card {
  background: var(--color-surface);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-purple-pale) 0%, var(--accent-yellow-pale) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-standard);
  z-index: 0;
}

.feature-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-large);
}

.feature-card:hover::before {
  opacity: 0.1;
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

.feature-card h3 {
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.feature-card p {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: var(--font-size-sm);
}

/* Mobile features adjustments */
@media (max-width: 48rem) {
  .feature-card {
    padding: var(--space-4);
    border-radius: var(--radius-base);
  }
  
  .feature-icon {
    font-size: 2rem;
  }
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */

.about {
  padding: var(--space-8) 0;
  background: var(--color-surface);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 64rem) {
  .about-content {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-8);
  }
}

.about-text h3 {
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.about-text h4 {
  color: var(--color-text);
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}

.approach-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.approach-list li {
  padding: var(--space-2) 0;
  position: relative;
  padding-left: var(--space-6);
  color: var(--color-text-secondary);
}

.approach-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-feature {
  background: var(--color-bg-1);
  padding: var(--space-4);
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-small);
}

.about-feature h4 {
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.about-feature p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   ADMISSIONS SECTION
   ========================================================================== */

.admissions {
  padding: var(--space-8) 0;
  background: var(--color-bg-2);
}

.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 48rem) {
  .process-steps {
    grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
    gap: var(--space-6);
  }
}

.process-step {
  background: var(--color-surface);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
  transition: all var(--duration-normal) var(--ease-standard);
}

.process-step:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-large);
}

.step-number {
  width: 3.75rem;
  height: 3.75rem;
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light));
  color: var(--neu-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin: 0 auto var(--space-4);
  box-shadow: var(--shadow-colored-purple);
}

.process-step h3 {
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.process-step p {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: var(--font-size-sm);
}

/* Mobile admissions adjustments */
@media (max-width: 48rem) {
  .process-step {
    padding: var(--space-4);
    border-radius: var(--radius-base);
  }
  
  .step-number {
    width: 3rem;
    height: 3rem;
    font-size: var(--font-size-xl);
  }
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact {
  padding: var(--space-8) 0;
  background: var(--color-surface);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 64rem) {
  .contact-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-item {
  padding: var(--space-4);
  background: var(--color-bg-3);
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-small);
}

.contact-form {
  background: var(--color-background);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-medium);
}

.contact-form h3 {
  margin-bottom: var(--space-5);
  color: var(--color-primary);
  text-align: center;
}

.contact-card {
  background: rgba(var(--neu-base-rgb), 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-purple), var(--accent-yellow));
}

.contact-card h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.contact-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.4;
}

.contact-card .btn {
  font-size: var(--font-size-sm);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light));
  border: none;
  border-radius: var(--radius-base);
  color: white;
  font-weight: var(--font-weight-semibold);
  transition: all var(--duration-normal) var(--ease-standard);
  width: 100%;
  cursor: pointer;
  box-shadow: var(--shadow-colored-purple);
}

.map-container {
  margin-top: var(--space-4);
  width: 100%;
  height: 18rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--color-border);
}

/* Mobile contact adjustments */
@media (max-width: 48rem) {
  .contact-item {
    padding: var(--space-3);
  }
  
  .contact-form {
    padding: var(--space-4);
    border-radius: var(--radius-base);
  }
  
  .map-container {
    height: 10rem;
    border-radius: var(--radius-base);
  }
}

/* ==========================================================================
   MODAL COMPONENTS
   ========================================================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 999;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-large);
  position: relative;
  z-index: 1;
}

.modal-lg .modal-content {
  max-width: 50rem;
}

.modal-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.modal-header h2 {
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.modal-header p {
  color: var(--color-text-secondary);
  margin: 0;
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--color-background);
  border: none;
  font-size: var(--font-size-2xl);
  color: var(--color-text-secondary);
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-small);
  transition: all var(--duration-fast) var(--ease-standard);
}

.modal-close:hover {
  background: var(--color-secondary);
  color: var(--color-text);
  transform: scale(1.1);
}

.modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

/* Mobile modal adjustments */
@media (max-width: 48rem) {
  .modal {
    padding: var(--space-2);
    align-items: flex-start;
    padding-top: var(--space-4);
  }
  
  .modal-content {
    padding: var(--space-4);
    border-radius: var(--radius-base);
    max-height: 95vh;
  }
  
  .modal-lg .modal-content {
    max-width: 95vw;
  }
  
  .modal-close {
    top: var(--space-3);
    right: var(--space-3);
    width: 2rem;
    height: 2rem;
    font-size: var(--font-size-xl);
  }
  
  .modal-body {
    max-height: 70vh;
  }
}

/* Login Modal Styles */
.login-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.login-option-btn {
  margin-bottom: var(--space-2);
}

.login-form {
  margin-top: var(--space-6);
}

.login-form h3 {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.login-links {
  text-align: center;
  margin-top: var(--space-4);
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}

.login-links a {
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

.login-links span {
  color: var(--color-text-secondary);
}

/* Course Detail Modal */
.course-detail-content {
  display: grid;
  gap: var(--space-6);
}

.course-detail-header {
  text-align: center;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.course-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 48rem) {
  .course-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
  }
}

.detail-section {
  background: var(--color-bg-1);
  padding: var(--space-4);
  border-radius: var(--radius-base);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-small);
}

.detail-section h4 {
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-list li {
  padding: var(--space-1) 0;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-border);
}

.detail-list li:last-child {
  border-bottom: none;
}

.course-cta-section {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.cta-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Mobile CTA buttons */
@media (max-width: 48rem) {
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
}

/* ==========================================================================
   SIDEBAR COMPONENT
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-surface);
  box-shadow: var(--shadow-large);
  transition: left var(--duration-normal) var(--ease-standard);
  z-index: 1001;
  overflow-y: auto;
  padding: var(--space-6) 0;
}

.sidebar.open {
  left: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-standard);
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-item {
  padding: var(--space-3) var(--space-6);
  color: var(--color-text);
  text-decoration: none;
  display: block;
  transition: all var(--duration-fast) var(--ease-standard);
  border-bottom: 1px solid var(--color-border);
}

.nav-item:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
}

/* Mobile sidebar full width */
@media (max-width: 48rem) {
  .sidebar {
    width: 100%;
    padding: var(--space-4) 0;
  }
}

/* ==========================================================================
   FOOTER COMPONENT
   ========================================================================== */

.footer {
  background: var(--neu-gray-900);
  color: var(--neu-gray-400);
  padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

@media (min-width: 48rem) {
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
    gap: var(--space-8);
  }
}

.footer-section h3,
.footer-section h4 {
  color: var(--primary-purple-light);
  margin-bottom: var(--space-3);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  padding: var(--space-1) 0;
  font-size: var(--font-size-sm);
}

.footer-section a {
  color: var(--neu-gray-400);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

.footer-section a:hover {
  color: var(--primary-purple-light);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(169, 157, 189, 0.2);
  color: var(--neu-gray-500);
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

@media (min-width: 48rem) {
  .section-header {
    margin-bottom: var(--space-8);
  }
}

.section-header h2 {
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  margin: 0;
}

@media (min-width: 48rem) {
  .section-header p {
    font-size: var(--font-size-lg);
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-8 { gap: var(--space-8); }

.m-0 { margin: 0; }
.mt-2 { margin-top: var(--space-2); }
.mb-2 { margin-bottom: var(--space-2); }
.mx-2 { margin-left: var(--space-2); margin-right: var(--space-2); }
.my-2 { margin-top: var(--space-2); margin-bottom: var(--space-2); }

.p-0 { padding: 0; }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

.block { display: block; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-center { text-align: center; }

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

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-medium);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

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

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.sidebar.open .nav-item {
  animation: slideInFromLeft 0.3s ease forwards;
}

.sidebar.open .nav-item:nth-child(1) { animation-delay: 0.1s; }
.sidebar.open .nav-item:nth-child(2) { animation-delay: 0.2s; }
.sidebar.open .nav-item:nth-child(3) { animation-delay: 0.3s; }
.sidebar.open .nav-item:nth-child(4) { animation-delay: 0.4s; }
.sidebar.open .nav-item:nth-child(5) { animation-delay: 0.5s; }

/* Reduced motion for accessibility */
@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;
  }
}

/* ==========================================================================
   SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
  width: 0.5rem;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-purple), var(--accent-yellow));
  border-radius: var(--radius-full);
  border: 1px solid var(--color-background);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-purple-light), var(--accent-yellow-light));
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-purple) var(--color-background);
}

/* ==========================================================================
   FOCUS STATES
   ========================================================================== */

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-medium);
}

/* ==========================================================================
   TABLE COMPONENTS
   ========================================================================== */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-base);
  overflow: hidden;
  box-shadow: var(--shadow-small);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.table th {
  background: var(--color-bg-1);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.table td {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.table tr:hover {
  background: var(--color-bg-3);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Mobile table adjustments */
@media (max-width: 48rem) {
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .table th,
  .table td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
  }
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.loading {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-border) 25%,
    var(--color-secondary) 50%,
    var(--color-border) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN IMPROVEMENTS
   ========================================================================== */

/* Ensure content doesn't overflow */
* {
  max-width: 100%;
  box-sizing: border-box;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive videos */
video {
  max-width: 100%;
  height: auto;
}

/* Touch-friendly interactive elements */
@media (max-width: 48rem) {
  button,
  .btn,
  input,
  select,
  textarea,
  a {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Safe area for notched screens */
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width: 48rem) {
    .header {
      padding-top: calc(var(--space-2) + env(safe-area-inset-top));
      min-height: calc(3.5rem + env(safe-area-inset-top));
    }
    
    body {
      padding-top: calc(3.5rem + env(safe-area-inset-top)) !important;
    }
  }
  
  @media (max-width: 30rem) {
    .header {
      padding-top: calc(var(--space-2) + env(safe-area-inset-top));
      min-height: calc(3rem + env(safe-area-inset-top));
    }
    
    body {
      padding-top: calc(3rem + env(safe-area-inset-top)) !important;
    }
  }
  
  @media (min-width: 48rem) {
    .header {
      padding-top: calc(var(--space-3) + env(safe-area-inset-top));
    }
  }
  
  .sidebar {
    padding-top: calc(var(--space-6) + env(safe-area-inset-top));
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header,
  .sidebar,
  .modal,
  .btn,
  button {
    display: none !important;
  }
  
  .container {
    max-width: none !important;
    padding: 0 !important;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
  
  @page {
    margin: 0.5in;
  }
}

/* ==========================================================================
   HIGH CONTRAST MODE SUPPORT
   ========================================================================== */

@media (prefers-contrast: high) {
  :root {
    --shadow-small: 0 0 0 1px currentColor;
    --shadow-medium: 0 0 0 2px currentColor;
    --shadow-large: 0 0 0 3px currentColor;
    --shadow-inset: inset 0 0 0 1px currentColor;
    --shadow-inset-small: inset 0 0 0 1px currentColor;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .card,
  .modal-content,
  .form-control {
    border: 2px solid currentColor;
  }
}

/* ==========================================================================
   ERROR FIXES AND IMPROVEMENTS
   ========================================================================== */

/* Fix z-index stacking */
.header { z-index: 100; }
.sidebar-overlay { z-index: 999; }
.sidebar { z-index: 1001; }
.modal-overlay { z-index: 1010; }
.modal { z-index: 1020; }

/* Fix button alignment */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* Fix form element consistency */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* Fix text selection */
::selection {
  background: rgba(var(--primary-purple-rgb), 0.3);
  color: var(--color-text);
}

::-moz-selection {
  background: rgba(var(--primary-purple-rgb), 0.3);
  color: var(--color-text);
}

/* Fix iOS zoom on input focus */
@media (max-width: 48rem) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Fix sticky header overlap */
section:first-of-type,
.main-content > *:first-child {
  scroll-margin-top: 5rem;
}

@media (max-width: 48rem) {
  section:first-of-type,
  .main-content > *:first-child {
    scroll-margin-top: 4rem;
  }
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* Screen reader only content */
.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;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* Better focus indicators */
.btn:focus-visible,
.form-control:focus-visible,
.nav-item:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Ensure sufficient color contrast */
@media (prefers-contrast: more) {
  :root {
    --color-text-secondary: var(--neu-gray-700);
    --color-border: rgba(var(--primary-purple-rgb), 0.3);
  }
}

/* ==========================================================================
   FINAL RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Extra small devices (phones, 320px and up) */
@media (max-width: 20rem) {
  .container {
    padding: 0 var(--space-2);
  }
  
  .hero {
    padding: var(--space-4) 0;
  }
  
  .btn {
    font-size: var(--font-size-sm);
    padding: var(--space-2) var(--space-3);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 36rem) {
  .courses-grid {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 48rem) {
  .main-content {
    padding-top: 0;
  }
  
  .header {
    position: sticky;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 62rem) {
  .container {
    padding: 0 var(--space-6);
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 75rem) {
  .container {
    padding: 0 var(--space-8);
  }
}
